LspWorkspaceEdit class final

A parsed WorkspaceEdit (omp's WorkspaceEdit, reduced to text edits).

Both wire shapes are supported: the legacy changes map and documentChanges entries carrying a textDocument + edits (TextDocumentEdit). Resource operations (create/rename/delete document changes) are collected in skippedResourceOps and reported but not applied (omp's resource-op planning is not ported — the Dart analysis server's rename answers carry text edits only).

Constructors

LspWorkspaceEdit({required Map<String, List<LspTextEdit>> textEdits, Map<String, int?> documentVersions = const {}, int skippedResourceOps = 0})
Creates an LspWorkspaceEdit.
const

Properties

documentVersions Map<String, int?>
The textDocument.version advertised per URI by documentChanges entries (null entry = server sent an unversioned identifier). Used by the version guard in lsp_edits.dart.
final
hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
Whether the edit carries no text edits at all.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
skippedResourceOps int
Number of resource operations (create/rename/delete) that were present but are not applied by this port.
final
textEdits Map<String, List<LspTextEdit>>
Text edits keyed by document URI (omp's flattenWorkspaceTextEdits).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fromJson(Object? json) LspWorkspaceEdit?
Parses a JSON workspace edit map. Returns null for non-map input.