Class: LSP::CallHierarchyItem

Inherits:
LSPBase
  • Object
show all
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. */ selectionRange: Range; }

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from LSPBase

#to_h, #to_json

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

#detailObject

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

#kindObject

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

#nameObject

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

#rangeObject

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

#selectionRangeObject

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

#tagsObject

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
  @tags
end

#uriObject

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.tags = 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