Class: LSP::CodeActionParams

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

Overview

export interface CodeActionParams extends WorkDoneProgressParams, PartialResultParams

/**
 * The document in which the command was invoked.
 */
textDocument: TextDocumentIdentifier;
/**
 * The range for which the command was invoked.
 */
range: Range;
/**
 * Context carrying additional information.
 */
context: CodeActionContext;

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from LSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ CodeActionParams

Returns a new instance of CodeActionParams.



1854
1855
1856
1857
# File 'lib/lsp/lsp_protocol.rb', line 1854

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

Instance Attribute Details

#contextObject

type: TextDocumentIdentifier # type: Range # type: CodeActionContext # type: ProgressToken # type: ProgressToken



1852
1853
1854
# File 'lib/lsp/lsp_protocol.rb', line 1852

def context
  @context
end

#partialResultTokenObject

type: TextDocumentIdentifier # type: Range # type: CodeActionContext # type: ProgressToken # type: ProgressToken



1852
1853
1854
# File 'lib/lsp/lsp_protocol.rb', line 1852

def partialResultToken
  @partialResultToken
end

#rangeObject

type: TextDocumentIdentifier # type: Range # type: CodeActionContext # type: ProgressToken # type: ProgressToken



1852
1853
1854
# File 'lib/lsp/lsp_protocol.rb', line 1852

def range
  @range
end

#textDocumentObject

type: TextDocumentIdentifier # type: Range # type: CodeActionContext # type: ProgressToken # type: ProgressToken



1852
1853
1854
# File 'lib/lsp/lsp_protocol.rb', line 1852

def textDocument
  @textDocument
end

#workDoneTokenObject

type: TextDocumentIdentifier # type: Range # type: CodeActionContext # type: ProgressToken # type: ProgressToken



1852
1853
1854
# File 'lib/lsp/lsp_protocol.rb', line 1852

def workDoneToken
  @workDoneToken
end

Instance Method Details

#from_h!(value) ⇒ Object



1859
1860
1861
1862
1863
1864
1865
1866
1867
# File 'lib/lsp/lsp_protocol.rb', line 1859

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