Class: LSP::CallHierarchyItem
- Defined in:
- lib/lsp/lsp_protocol_callhierarchy.proposed.rb
Overview
export interface CallHierarchyItem
/**
* The name of this item.
*/
name: string;
/**
* The kind of this item.
*/
kind: SymbolKind;
/**
* Tags for this item.
*/
tags?: SymbolTag[];
/**
* More detail for this item, e.g. the signature of a function.
*/
detail?: string;
/**
* The resource identifier of this item.
*/
uri: DocumentUri;
/**
* The range enclosing this symbol not including leading/trailing whitespace but everything else, e.g. comments and code.
*/
range: Range;
/**
* 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 the [`range`](#CallHierarchyItem.range).
*/
selectionRange: Range;
Instance Attribute Summary collapse
-
#detail ⇒ Object
type: string # type: SymbolKind # type: SymbolTag[] # type: string # type: DocumentUri # type: Range # type: Range.
-
#kind ⇒ Object
type: string # type: SymbolKind # type: SymbolTag[] # type: string # type: DocumentUri # type: Range # type: Range.
-
#name ⇒ Object
type: string # type: SymbolKind # type: SymbolTag[] # type: string # type: DocumentUri # type: Range # type: Range.
-
#range ⇒ Object
type: string # type: SymbolKind # type: SymbolTag[] # type: string # type: DocumentUri # type: Range # type: Range.
-
#selectionRange ⇒ Object
type: string # type: SymbolKind # type: SymbolTag[] # type: string # type: DocumentUri # type: Range # type: Range.
-
#tags ⇒ Object
type: string # type: SymbolKind # type: SymbolTag[] # type: string # type: DocumentUri # type: Range # type: Range.
-
#uri ⇒ Object
type: string # type: SymbolKind # type: SymbolTag[] # type: string # type: DocumentUri # type: Range # type: Range.
Instance Method Summary collapse
- #from_h!(value) ⇒ Object
-
#initialize(initial_hash = nil) ⇒ CallHierarchyItem
constructor
A new instance of CallHierarchyItem.
Methods inherited from LSPBase
Constructor Details
#initialize(initial_hash = nil) ⇒ CallHierarchyItem
Returns a new instance of CallHierarchyItem.
45 46 47 48 |
# File 'lib/lsp/lsp_protocol_callhierarchy.proposed.rb', line 45 def initialize(initial_hash = nil) super @optional_method_names = %i[tags detail] end |
Instance Attribute Details
#detail ⇒ Object
type: string # type: SymbolKind # type: SymbolTag[] # type: string # type: DocumentUri # type: Range # type: Range
43 44 45 |
# File 'lib/lsp/lsp_protocol_callhierarchy.proposed.rb', line 43 def detail @detail end |
#kind ⇒ Object
type: string # type: SymbolKind # type: SymbolTag[] # type: string # type: DocumentUri # type: Range # type: Range
43 44 45 |
# File 'lib/lsp/lsp_protocol_callhierarchy.proposed.rb', line 43 def kind @kind end |
#name ⇒ Object
type: string # type: SymbolKind # type: SymbolTag[] # type: string # type: DocumentUri # type: Range # type: Range
43 44 45 |
# File 'lib/lsp/lsp_protocol_callhierarchy.proposed.rb', line 43 def name @name end |
#range ⇒ Object
type: string # type: SymbolKind # type: SymbolTag[] # type: string # type: DocumentUri # type: Range # type: Range
43 44 45 |
# File 'lib/lsp/lsp_protocol_callhierarchy.proposed.rb', line 43 def range @range end |
#selectionRange ⇒ Object
type: string # type: SymbolKind # type: SymbolTag[] # type: string # type: DocumentUri # type: Range # type: Range
43 44 45 |
# File 'lib/lsp/lsp_protocol_callhierarchy.proposed.rb', line 43 def selectionRange @selectionRange end |
#tags ⇒ Object
type: string # type: SymbolKind # type: SymbolTag[] # type: string # type: DocumentUri # type: Range # type: Range
43 44 45 |
# File 'lib/lsp/lsp_protocol_callhierarchy.proposed.rb', line 43 def @tags end |
#uri ⇒ Object
type: string # type: SymbolKind # type: SymbolTag[] # type: string # type: DocumentUri # type: Range # type: Range
43 44 45 |
# File 'lib/lsp/lsp_protocol_callhierarchy.proposed.rb', line 43 def uri @uri end |
Instance Method Details
#from_h!(value) ⇒ Object
50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/lsp/lsp_protocol_callhierarchy.proposed.rb', line 50 def from_h!(value) value = {} if value.nil? self.name = value['name'] self.kind = value['kind'] # Unknown type self. = value['tags'].map { |val| val } unless value['tags'].nil? # Unknown array type self.detail = value['detail'] self.uri = value['uri'] # Unknown type self.range = value['range'] # Unknown type self.selectionRange = value['selectionRange'] # Unknown type self end |