Class WorkspaceEdit

java.lang.Object
org.graalvm.tools.lsp.server.types.JSONBase
org.graalvm.tools.lsp.server.types.WorkspaceEdit

public class WorkspaceEdit extends JSONBase
A workspace edit represents changes to many resources managed in the workspace. The edit should either provide `changes` or `documentChanges`. If documentChanges are present they are preferred over `changes` if the client can handle versioned document edits.
  • Method Details

    • getChanges

      public Map<String,List<TextEdit>> getChanges()
      Holds changes to existing resources.
    • setChanges

      public WorkspaceEdit setChanges(Map<String,List<TextEdit>> changes)
    • getDocumentChanges

      public List<Object> getDocumentChanges()
      Depending on the client capability `workspace.workspaceEdit.resourceOperations` document changes are either an array of `TextDocumentEdit`s to express changes to n different text documents where each text document edit addresses a specific version of a text document. Or it can contain above `TextDocumentEdit`s mixed with create, rename and delete file / folder operations. Whether a client supports versioned document edits is expressed via `workspace.workspaceEdit.documentChanges` client capability. If a client neither supports `documentChanges` nor `workspace.workspaceEdit.resourceOperations` then only plain `TextEdit`s using the `changes` property are supported.
    • setDocumentChanges

      public WorkspaceEdit setDocumentChanges(List<Object> documentChanges)
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • create

      public static WorkspaceEdit create()