Interface IRenameService2

All Known Implementing Classes:
RenameService2

public interface IRenameService2
Service called for rename refactoring.
Since:
2.18
Author:
koehnlein - Initial contribution and API
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
     
    static class 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.eclipse.lsp4j.jsonrpc.messages.Either3<org.eclipse.lsp4j.Range,org.eclipse.lsp4j.PrepareRenameResult,org.eclipse.lsp4j.PrepareRenameDefaultBehavior>
    Returns a range describing the range of the string to rename and optionally a placeholder text of the string content to be renamed.
    org.eclipse.lsp4j.WorkspaceEdit
     
  • Method Details

    • rename

      org.eclipse.lsp4j.WorkspaceEdit rename(IRenameService2.Options options)
    • prepareRename

      org.eclipse.lsp4j.jsonrpc.messages.Either3<org.eclipse.lsp4j.Range,org.eclipse.lsp4j.PrepareRenameResult,org.eclipse.lsp4j.PrepareRenameDefaultBehavior> prepareRename(IRenameService2.PrepareRenameOptions options)
      Returns a range describing the range of the string to rename and optionally a placeholder text of the string content to be renamed.

      If null is returned then it is deemed that invoking rename with the same text document position will not result in a valid workspace edit.

      The default implementation only checks whether there is an identifier under the give text document position or not.

      This method should be used to set up and to test the validity of a rename operation at a given location.
      See textDocument/prepareRename for more details.