public class WorkspaceEdit
extends java.lang.Object
changes or documentChanges.
If documentChanges are present they are preferred over changes
if the client can handle versioned document edits.| Constructor and Description |
|---|
WorkspaceEdit() |
WorkspaceEdit(java.util.List<org.eclipse.lsp4j.jsonrpc.messages.Either<TextDocumentEdit,ResourceOperation>> documentChanges) |
WorkspaceEdit(java.util.Map<java.lang.String,java.util.List<TextEdit>> changes) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
java.util.Map<java.lang.String,ChangeAnnotation> |
getChangeAnnotations()
A map of change annotations that can be referenced in
AnnotatedTextEdits or ResourceOperations. |
java.util.Map<java.lang.String,java.util.List<TextEdit>> |
getChanges()
Holds changes to existing resources.
|
java.util.List<org.eclipse.lsp4j.jsonrpc.messages.Either<TextDocumentEdit,ResourceOperation>> |
getDocumentChanges()
Depending on the client capability
WorkspaceEditCapabilities.resourceOperations document changes are either
an array of TextDocumentEdits to express changes to n different text
documents where each text document edit addresses a specific version of
a text document. |
java.util.List<org.eclipse.lsp4j.jsonrpc.messages.Either<ResourceChange,TextDocumentEdit>> |
getResourceChanges()
Deprecated.
Since LSP introduces resource operations, use the
documentChanges instead |
int |
hashCode() |
void |
setChangeAnnotations(java.util.Map<java.lang.String,ChangeAnnotation> changeAnnotations)
A map of change annotations that can be referenced in
AnnotatedTextEdits or ResourceOperations. |
void |
setChanges(java.util.Map<java.lang.String,java.util.List<TextEdit>> changes)
Holds changes to existing resources.
|
void |
setDocumentChanges(java.util.List<org.eclipse.lsp4j.jsonrpc.messages.Either<TextDocumentEdit,ResourceOperation>> documentChanges)
Depending on the client capability
WorkspaceEditCapabilities.resourceOperations document changes are either
an array of TextDocumentEdits to express changes to n different text
documents where each text document edit addresses a specific version of
a text document. |
void |
setResourceChanges(java.util.List<org.eclipse.lsp4j.jsonrpc.messages.Either<ResourceChange,TextDocumentEdit>> resourceChanges)
Deprecated.
Since LSP introduces resource operations, use the
documentChanges instead |
java.lang.String |
toString() |
public WorkspaceEdit()
public WorkspaceEdit(java.util.Map<java.lang.String,java.util.List<TextEdit>> changes)
public WorkspaceEdit(java.util.List<org.eclipse.lsp4j.jsonrpc.messages.Either<TextDocumentEdit,ResourceOperation>> documentChanges)
@Pure public java.util.Map<java.lang.String,java.util.List<TextEdit>> getChanges()
public void setChanges(java.util.Map<java.lang.String,java.util.List<TextEdit>> changes)
@Pure public java.util.List<org.eclipse.lsp4j.jsonrpc.messages.Either<TextDocumentEdit,ResourceOperation>> getDocumentChanges()
WorkspaceEditCapabilities.resourceOperations document changes are either
an array of TextDocumentEdits 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 TextDocumentEdits mixed with
create, rename and delete file / folder operations.
Whether a client supports versioned document edits is expressed via
WorkspaceEditCapabilities.documentChanges client capability.
If a client neither supports WorkspaceEditCapabilities.documentChanges nor
WorkspaceEditCapabilities.resourceOperations then only plain TextEdits
using the changes property are supported.public void setDocumentChanges(java.util.List<org.eclipse.lsp4j.jsonrpc.messages.Either<TextDocumentEdit,ResourceOperation>> documentChanges)
WorkspaceEditCapabilities.resourceOperations document changes are either
an array of TextDocumentEdits 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 TextDocumentEdits mixed with
create, rename and delete file / folder operations.
Whether a client supports versioned document edits is expressed via
WorkspaceEditCapabilities.documentChanges client capability.
If a client neither supports WorkspaceEditCapabilities.documentChanges nor
WorkspaceEditCapabilities.resourceOperations then only plain TextEdits
using the changes property are supported.@Pure @Deprecated public java.util.List<org.eclipse.lsp4j.jsonrpc.messages.Either<ResourceChange,TextDocumentEdit>> getResourceChanges()
documentChanges instead@Deprecated public void setResourceChanges(java.util.List<org.eclipse.lsp4j.jsonrpc.messages.Either<ResourceChange,TextDocumentEdit>> resourceChanges)
documentChanges instead@Pure public java.util.Map<java.lang.String,ChangeAnnotation> getChangeAnnotations()
AnnotatedTextEdits or ResourceOperations.
Client support depends on WorkspaceEditCapabilities.changeAnnotationSupport.
Since 3.16.0public void setChangeAnnotations(java.util.Map<java.lang.String,ChangeAnnotation> changeAnnotations)
AnnotatedTextEdits or ResourceOperations.
Client support depends on WorkspaceEditCapabilities.changeAnnotationSupport.
Since 3.16.0@Pure public java.lang.String toString()
toString in class java.lang.Object@Pure public boolean equals(java.lang.Object obj)
equals in class java.lang.Object@Pure public int hashCode()
hashCode in class java.lang.Object