Class: LSP::ReferenceParams

Inherits:
LSPBase
  • Object
show all
Defined in:
lib/lsp/lsp_protocol.rb

Overview

export interface ReferenceParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams

context: ReferenceContext;

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from LSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ ReferenceParams

Returns a new instance of ReferenceParams.



1532
1533
1534
1535
# File 'lib/lsp/lsp_protocol.rb', line 1532

def initialize(initial_hash = nil)
  super
  @optional_method_names = %i[workDoneToken partialResultToken]
end

Instance Attribute Details

#contextObject

type: ReferenceContext # type: TextDocumentIdentifier # type: Position # type: ProgressToken # type: ProgressToken



1530
1531
1532
# File 'lib/lsp/lsp_protocol.rb', line 1530

def context
  @context
end

#partialResultTokenObject

type: ReferenceContext # type: TextDocumentIdentifier # type: Position # type: ProgressToken # type: ProgressToken



1530
1531
1532
# File 'lib/lsp/lsp_protocol.rb', line 1530

def partialResultToken
  @partialResultToken
end

#positionObject

type: ReferenceContext # type: TextDocumentIdentifier # type: Position # type: ProgressToken # type: ProgressToken



1530
1531
1532
# File 'lib/lsp/lsp_protocol.rb', line 1530

def position
  @position
end

#textDocumentObject

type: ReferenceContext # type: TextDocumentIdentifier # type: Position # type: ProgressToken # type: ProgressToken



1530
1531
1532
# File 'lib/lsp/lsp_protocol.rb', line 1530

def textDocument
  @textDocument
end

#workDoneTokenObject

type: ReferenceContext # type: TextDocumentIdentifier # type: Position # type: ProgressToken # type: ProgressToken



1530
1531
1532
# File 'lib/lsp/lsp_protocol.rb', line 1530

def workDoneToken
  @workDoneToken
end

Instance Method Details

#from_h!(value) ⇒ Object



1537
1538
1539
1540
1541
1542
1543
1544
1545
# File 'lib/lsp/lsp_protocol.rb', line 1537

def from_h!(value)
  value = {} if value.nil?
  self.context = value['context'] # Unknown type
  self.textDocument = value['textDocument'] # Unknown type
  self.position = value['position'] # Unknown type
  self.workDoneToken = value['workDoneToken'] # Unknown type
  self.partialResultToken = value['partialResultToken'] # Unknown type
  self
end