Class: LSP::RenameParams

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

Overview

export interface RenameParams extends WorkDoneProgressParams

/**
 * The document to rename.
 */
textDocument: TextDocumentIdentifier;
/**
 * The position at which this request was sent.
 */
position: Position;
/**
 * The new name of the symbol. If the given name is not valid the
 * request must return a [ResponseError](#ResponseError) with an
 * appropriate message set.
 */
newName: string;

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from LSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ RenameParams

Returns a new instance of RenameParams.



2516
2517
2518
2519
# File 'lib/lsp/lsp_protocol.rb', line 2516

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

Instance Attribute Details

#newNameObject

type: TextDocumentIdentifier # type: Position # type: string # type: ProgressToken



2514
2515
2516
# File 'lib/lsp/lsp_protocol.rb', line 2514

def newName
  @newName
end

#positionObject

type: TextDocumentIdentifier # type: Position # type: string # type: ProgressToken



2514
2515
2516
# File 'lib/lsp/lsp_protocol.rb', line 2514

def position
  @position
end

#textDocumentObject

type: TextDocumentIdentifier # type: Position # type: string # type: ProgressToken



2514
2515
2516
# File 'lib/lsp/lsp_protocol.rb', line 2514

def textDocument
  @textDocument
end

#workDoneTokenObject

type: TextDocumentIdentifier # type: Position # type: string # type: ProgressToken



2514
2515
2516
# File 'lib/lsp/lsp_protocol.rb', line 2514

def workDoneToken
  @workDoneToken
end

Instance Method Details

#from_h!(value) ⇒ Object



2521
2522
2523
2524
2525
2526
2527
2528
# File 'lib/lsp/lsp_protocol.rb', line 2521

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