Class LocationLink


  • public class LocationLink
    extends java.lang.Object
    Represents a link between a source and a target location.

    Since 3.14.0

    • Constructor Detail

      • LocationLink

        public LocationLink()
      • LocationLink

        public LocationLink​(java.lang.String targetUri,
                            Range targetRange,
                            Range targetSelectionRange)
      • LocationLink

        public LocationLink​(java.lang.String targetUri,
                            Range targetRange,
                            Range targetSelectionRange,
                            Range originSelectionRange)
    • Method Detail

      • getOriginSelectionRange

        public Range getOriginSelectionRange()
        Span of the origin of this link.

        Used as the underlined span for mouse interaction. Defaults to the word range at the mouse position.

      • setOriginSelectionRange

        public void setOriginSelectionRange​(Range originSelectionRange)
        Span of the origin of this link.

        Used as the underlined span for mouse interaction. Defaults to the word range at the mouse position.

      • getTargetUri

        public java.lang.String getTargetUri()
        The target resource identifier of this link.
      • setTargetUri

        public void setTargetUri​(java.lang.String targetUri)
        The target resource identifier of this link.
      • getTargetRange

        public Range getTargetRange()
        The full target range of this link. If the target for example is a symbol then target range is the range enclosing this symbol not including leading/trailing whitespace but everything else like comments. This information is typically used to highlight the range in the editor.
      • setTargetRange

        public void setTargetRange​(Range targetRange)
        The full target range of this link. If the target for example is a symbol then target range is the range enclosing this symbol not including leading/trailing whitespace but everything else like comments. This information is typically used to highlight the range in the editor.
      • getTargetSelectionRange

        public Range getTargetSelectionRange()
        The range that should be selected and revealed when this link is being followed, e.g the name of a function. Must be contained by the targetRange. See also DocumentSymbol.range
      • setTargetSelectionRange

        public void setTargetSelectionRange​(Range targetSelectionRange)
        The range that should be selected and revealed when this link is being followed, e.g the name of a function. Must be contained by the targetRange. See also DocumentSymbol.range
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object