Package org.eclipse.lsp4j
Class DocumentSymbol
- java.lang.Object
-
- org.eclipse.lsp4j.DocumentSymbol
-
public class DocumentSymbol extends java.lang.Object
Represents programming constructs like variables, classes, interfaces etc. that appear in a document. Document symbols can be hierarchical and they have two ranges: one that encloses its definition and one that points to its most interesting range, e.g. the range of an identifier.Since 3.10.0
-
-
Constructor Summary
Constructors Constructor Description DocumentSymbol()
DocumentSymbol(java.lang.String name, SymbolKind kind, Range range, Range selectionRange)
DocumentSymbol(java.lang.String name, SymbolKind kind, Range range, Range selectionRange, java.lang.String detail)
DocumentSymbol(java.lang.String name, SymbolKind kind, Range range, Range selectionRange, java.lang.String detail, java.util.List<DocumentSymbol> children)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.util.List<DocumentSymbol>
getChildren()
Children of this symbol, e.g.java.lang.Boolean
getDeprecated()
Deprecated.Usetags
instead if supported.java.lang.String
getDetail()
More detail for this symbol, e.g the signature of a function.SymbolKind
getKind()
The kind of this symbol.java.lang.String
getName()
The name of this symbol.Range
getRange()
The range enclosing this symbol not including leading/trailing whitespace but everything else like comments.Range
getSelectionRange()
The range that should be selected and revealed when this symbol is being picked, e.g the name of a function.java.util.List<SymbolTag>
getTags()
Tags for this document symbol.int
hashCode()
void
setChildren(java.util.List<DocumentSymbol> children)
Children of this symbol, e.g.void
setDeprecated(java.lang.Boolean deprecated)
Deprecated.Usetags
instead if supported.void
setDetail(java.lang.String detail)
More detail for this symbol, e.g the signature of a function.void
setKind(SymbolKind kind)
The kind of this symbol.void
setName(java.lang.String name)
The name of this symbol.void
setRange(Range range)
The range enclosing this symbol not including leading/trailing whitespace but everything else like comments.void
setSelectionRange(Range selectionRange)
The range that should be selected and revealed when this symbol is being picked, e.g the name of a function.void
setTags(java.util.List<SymbolTag> tags)
Tags for this document symbol.java.lang.String
toString()
-
-
-
Constructor Detail
-
DocumentSymbol
public DocumentSymbol()
-
DocumentSymbol
public DocumentSymbol(java.lang.String name, SymbolKind kind, Range range, Range selectionRange)
-
DocumentSymbol
public DocumentSymbol(java.lang.String name, SymbolKind kind, Range range, Range selectionRange, java.lang.String detail)
-
DocumentSymbol
public DocumentSymbol(java.lang.String name, SymbolKind kind, Range range, Range selectionRange, java.lang.String detail, java.util.List<DocumentSymbol> children)
-
-
Method Detail
-
getName
public java.lang.String getName()
The name of this symbol.
-
setName
public void setName(java.lang.String name)
The name of this symbol.
-
getKind
public SymbolKind getKind()
The kind of this symbol.
-
setKind
public void setKind(SymbolKind kind)
The kind of this symbol.
-
getRange
public Range getRange()
The range enclosing this symbol not including leading/trailing whitespace but everything else like comments. This information is typically used to determine if the client's cursor is inside the symbol to reveal the symbol in the UI.
-
setRange
public void setRange(Range range)
The range enclosing this symbol not including leading/trailing whitespace but everything else like comments. This information is typically used to determine if the client's cursor is inside the symbol to reveal the symbol in the UI.
-
getSelectionRange
public Range getSelectionRange()
The range that should be selected and revealed when this symbol is being picked, e.g the name of a function. Must be contained by therange
.
-
setSelectionRange
public void setSelectionRange(Range selectionRange)
The range that should be selected and revealed when this symbol is being picked, e.g the name of a function. Must be contained by therange
.
-
getDetail
public java.lang.String getDetail()
More detail for this symbol, e.g the signature of a function. If not provided the name is used.
-
setDetail
public void setDetail(java.lang.String detail)
More detail for this symbol, e.g the signature of a function. If not provided the name is used.
-
getTags
public java.util.List<SymbolTag> getTags()
Tags for this document symbol.Since 3.16.0
-
setTags
public void setTags(java.util.List<SymbolTag> tags)
Tags for this document symbol.Since 3.16.0
-
getDeprecated
@Deprecated public java.lang.Boolean getDeprecated()
Deprecated.Usetags
instead if supported.Indicates if this symbol is deprecated.
-
setDeprecated
@Deprecated public void setDeprecated(java.lang.Boolean deprecated)
Deprecated.Usetags
instead if supported.Indicates if this symbol is deprecated.
-
getChildren
public java.util.List<DocumentSymbol> getChildren()
Children of this symbol, e.g. properties of a class.
-
setChildren
public void setChildren(java.util.List<DocumentSymbol> children)
Children of this symbol, e.g. properties of a class.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-