Interface TreeSelectionService

SelectionProvider is implemented by services to notify listeners about selection changes.

interface TreeSelectionService {
    onSelectionChanged: Event<readonly Readonly<SelectableTreeNode>[]>;
    selectedNodes: readonly Readonly<SelectableTreeNode>[];
    addSelection(selectionOrTreeNode): void;
    clearSelection(): void;
    dispose(): void;
    restoreState(state): void;
    storeState(): object;
}

Hierarchy (view full)

Implemented by

Properties

onSelectionChanged: Event<readonly Readonly<SelectableTreeNode>[]>

Emitted when the selection has changed in the tree.

selectedNodes: readonly Readonly<SelectableTreeNode>[]

The tree selection, representing the selected nodes from the tree. If nothing is selected, the result will be empty.

Methods

  • Registers the given selection into the tree selection service. If the selection state changes after adding the selectionOrTreeNode argument, a selection changed event will be fired. If the argument is a tree node, a it will be treated as a tree selection with the default selection type.

    Parameters

    Returns void