Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface TreeModel

Hierarchy

Implemented by

Index

Properties

Tree

Tree: unique symbol = Symbol('Tree')

TreeExpansionService

TreeExpansionService: unique symbol = Symbol('TreeExpansionService')

TreeSelectionService

TreeSelectionService: unique symbol = Symbol('TreeSelectionService')

The tree selection service.

Readonly onChanged

onChanged: Event<void>

Emit when the tree is changed.

Readonly onDidChangeBusy

onDidChangeBusy: Event<TreeNode>

Emits when the busy state of the given node is changed.

Readonly onExpansionChanged

onExpansionChanged: Event<Readonly<ExpandableTreeNode>>

Emit when the node is expanded or collapsed.

Readonly onNodeRefreshed

Emit when the children of the given node are refreshed.

Readonly onOpenNode

onOpenNode: Event<Readonly<TreeNode>>

Event when a node should be opened.

Readonly onSelectionChanged

onSelectionChanged: Event<ReadonlyArray<Readonly<SelectableTreeNode>>>

Emitted when the selection has changed in the tree.

root

root: TreeNode | undefined

A root node of this tree. Undefined if there is no root node. Setting a root node refreshes the tree.

Readonly selectedNodes

selectedNodes: ReadonlyArray<Readonly<SelectableTreeNode>>

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

Methods

addSelection

canNavigateBackward

  • canNavigateBackward(): boolean

canNavigateForward

  • canNavigateForward(): boolean

collapseAll

collapseNode

dispose

  • dispose(): void

expandNode

getNextSelectableNode

getNode

  • getNode(id: string | undefined): TreeNode | undefined

getPrevSelectableNode

markAsBusy

navigateBackward

  • navigateBackward(): Promise<void>

navigateForward

  • navigateForward(): Promise<void>

navigateTo

  • Navigates to the given node if it is defined. This method accepts both the tree node and its ID as an argument. Navigation sets a node as a root node and expand it. Resolves to the node if the navigation was successful. Otherwise, resolves to undefined.

    Parameters

    Returns Promise<TreeNode | undefined>

openNode

refresh

restoreState

  • restoreState(state: object): void

selectNextNode

selectNode

selectParent

  • selectParent(): void

selectPrevNode

selectRange

storeState

  • storeState(): object

toggleNode

toggleNodeExpansion

validateNode