Documentation

WorkspaceEdit
in package
implements JsonSerializable

A workspace edit represents changes to many resources managed in the workspace.

Table of Contents

Interfaces

JsonSerializable

Properties

$changeAnnotations  : array<string, ChangeAnnotation>|null
A map of change annotations that can be referenced in `AnnotatedTextEdit`s or create, rename and delete file / folder operations.
$changes  : array<string, array<string|int, TextEdit>>
Holds changes to existing resources. Associative Array from URI to TextEdit
$documentChanges  : mixed
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.

Methods

__construct()  : mixed
jsonSerialize()  : mixed
This is needed because VSCode Does not like nulls meaning if a null is sent then this will not compute

Properties

$changeAnnotations

A map of change annotations that can be referenced in `AnnotatedTextEdit`s or create, rename and delete file / folder operations.

public array<string, ChangeAnnotation>|null $changeAnnotations

Whether clients honor this property depends on the client capability workspace.changeAnnotationSupport.

Tags
since
3.16.0

$changes

Holds changes to existing resources. Associative Array from URI to TextEdit

public array<string, array<string|int, TextEdit>> $changes

$documentChanges

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.

public mixed $documentChanges

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 TextEdits using the changes property are supported.

Methods

__construct()

public __construct([array<string, array<string|int, TextEdit>> $changes = [] ][, mixed $documentChanges = null ][, array<string, ChangeAnnotation>|null $changeAnnotations = null ]) : mixed
Parameters
$changes : array<string, array<string|int, TextEdit>> = []
$documentChanges : mixed = null
$changeAnnotations : array<string, ChangeAnnotation>|null = null

jsonSerialize()

This is needed because VSCode Does not like nulls meaning if a null is sent then this will not compute

public jsonSerialize() : mixed
Attributes
#[ReturnTypeWillChange]

        
On this page

Search results