Interface TreeDecoratorService

The TreeDecoratorService manages a set of known {link TreeDecorator}s and emits events when any of the known decorators has changes. Typically, a TreeDecoratorService provides a contribution point that can be used to register TreeDecorators exclusively for this service.

Example usage

export const MyTreeDecorator = Symbol('MyTreeDecorator');

@injectable()
export class MyDecorationService extends AbstractTreeDecoratorService {
constructor(@inject(ContributionProvider) @named(MyTreeDecorator) protected readonly contributions: ContributionProvider<TreeDecorator>) {
super(contributions.getContributions());
}
}
interface TreeDecoratorService {
    onDidChangeDecorations: Event<void>;
    deflateDecorators(decorations): object;
    dispose(): void;
    getDecorations(tree): MaybePromise<Map<string, core.Data[]>>;
    inflateDecorators(state): Map<string, core.Data[]>;
}

Hierarchy (view full)

Implemented by

Properties

onDidChangeDecorations: Event<void>

Fired when any of the available tree decorators has changes.

Methods

  • Transforms the decoration data into an object, so that it can be safely serialized into JSON.

    Parameters

    • decorations: Map<string, core.Data[]>

      the decoration data that should be deflated

    Returns object

    the decoration data as serializable JSON object