Interface IEditorDecorationsCollection
Expand description
interface IEditorDecorationsCollection {
length: number;
onDidChange: IEvent<IModelDecorationsChangedEvent>;
append(
newDecorations: readonly IModelDeltaDecoration[],
): string[];
clear(): void;
getRange(index: number): Range;
getRanges(): Range[];
has(decoration: IModelDecoration): boolean;
set(
newDecorations: readonly IModelDeltaDecoration[],
): string[];
}Properties§
§§
length: numberGet the decorations count.
readonly on Did Change: IEvent<IModelDecorationsChangedEvent>An event emitted when decorations change in the editor, but the change is not caused by us setting or clearing the collection.
Methods§
§append(
newDecorations: readonly IModelDeltaDecoration[],
): string[]
append(
newDecorations: readonly IModelDeltaDecoration[],
): string[]
Append newDecorations to this collection.
§clear(): void
clear(): void
Remove all previous decorations.
§has(decoration: IModelDecoration): boolean
has(decoration: IModelDecoration): boolean
Determine if a decoration is in this collection.
§set(
newDecorations: readonly IModelDeltaDecoration[],
): string[]
set(
newDecorations: readonly IModelDeltaDecoration[],
): string[]
Replace all previous decorations with newDecorations.
A collection of decorations