package edit
Type Members
-
case class
CreateFile
(uri: String, options: Option[NewFileOptions]) extends ResourceOperation with Product with Serializable
Create file operation
Create file operation
- uri
The resource to create.
- options
Additional options
-
case class
DeleteFile
(uri: String, options: Option[DeleteFileOptions]) extends ResourceOperation with Product with Serializable
Delete file operation
Delete file operation
- uri
The file to delete.
- options
Delete options.
-
case class
DeleteFileOptions
(recursive: Option[Boolean], ignoreIfNotExists: Option[Boolean]) extends Product with Serializable
Delete file options
Delete file options
- recursive
Delete the content recursively if a folder is denoted.
- ignoreIfNotExists
Ignore the operation if the file doesn't exist.
-
case class
NewFileOptions
(overwrite: Option[Boolean], ignoreIfExists: Option[Boolean]) extends Product with Serializable
Options to create a file.
Options to create a file.
- overwrite
Overwrite existing file. Overwrite wins over
ignoreIfExists- ignoreIfExists
Ignore if exists.
-
case class
RenameFile
(oldUri: String, newUri: String, options: Option[NewFileOptions]) extends ResourceOperation with Product with Serializable
Rename file operation
Rename file operation
- oldUri
The old (existing) location.
- newUri
The new location.
- options
Additional options.
- sealed trait ResourceOperation extends AnyRef
-
case class
TextDocumentEdit
(textDocument: VersionedTextDocumentIdentifier, edits: Seq[TextEdit]) extends Product with Serializable
Describes textual changes on a single text document.
Describes textual changes on a single text document. The text document is referred to as a VersionedTextDocumentIdentifier to allow clients to check the text document version before an edit is applied. A TextDocumentEdit describes all changes on a version Si and after they are applied move the document to version Si+1. So the creator of a TextDocumentEdit doesn’t need to sort the array or do any kind of ordering. However the edits must be non overlapping.
- textDocument
The text document to change.
- edits
The edits to be applied.
-
case class
TextEdit
(range: Range, newText: String) extends Product with Serializable
A textual edit applicable to a text document.
A textual edit applicable to a text document.
- range
The range of the text document to be manipulated. To insert text into a document create a range where start === end.
- newText
The string to be inserted. For delete operations use an empty string.
-
case class
WorkspaceEdit
(changes: Map[String, Seq[TextEdit]], documentChanges: Seq[Either[TextDocumentEdit, ResourceOperation]]) extends Product with Serializable
A workspace edit represents changes to many resources managed in the workspace.
A workspace edit represents changes to many resources managed in the workspace. The edit should either provide changes or documentChanges. If the client can handle versioned document edits and if documentChanges are present, the latter are preferred over changes.
- changes
Holds changes to existing resources.
- documentChanges
Depending on the client capability
workspace.workspaceEdit.resourceOperationsdocument changes are either an array ofTextDocumentEdits 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 aboveTextDocumentEdits mixed with create, rename and delete file / folder operations. Whether a client supports versioned document edits is expressed viaworkspace.workspaceEdit.documentChangesclient capability. If a client neither supportsdocumentChangesnorworkspace.workspaceEdit.resourceOperationsthen only plainTextEdits using thechangesproperty are supported.