Represents a Tree view

Fields

read onlyvisible:Bool

true if the {@link TreeView tree view} is visible otherwise false.

@:optionaloptionaltitle:Null<String>

The tree view title is initially taken from the extension package.json Changes to the title property will be properly reflected in the UI in the title of the view.

read onlyselection:Array<T>

Currently selected elements.

reveal(element:T, ?options:{select:Null<Bool>, focus:Null<Bool>, exapnd:Null<EitherType<Bool, Int>>}):Thenable<Void>

Reveals the given element in the tree view. If the tree view is not visible then the tree view is shown and element is revealed.

By default revealed element is selected. In order to not to select, set the option select to false. In order to focus, set the option focus to true. In order to expand the revealed element, set the option expand to true. To expand recursively set expand to the number of levels to expand. NOTE: You can expand only to 3 levels maximum.

NOTE: The {@link TreeDataProvider} that the TreeView {@link window.createTreeView is registered with} with must implement {@link TreeDataProvider.getParent getParent} method to access this API.

read onlyonDidExpandElement:Event<TreeViewExpansionEvent<T>>

Event that is fired when an element is expanded

read onlyonDidCollapseElement:Event<TreeViewExpansionEvent<T>>

Event that is fired when an element is collapsed

read onlyonDidChangeVisibility:Event<TreeViewVisibilityChangeEvent>

Event that is fired when {@link TreeView.visible visibility} has changed

read onlyonDidChangeSelection:Event<TreeViewSelectionChangeEvent<T>>

Event that is fired when the {@link TreeView.selection selection} has changed

@:optionaloptionalmessage:Null<String>

An optional human-readable message that will be rendered in the view. Setting the message to null, undefined, or empty string will remove the message from the view.

dispose():Void

Dispose this object.

@:optionaloptionaldescription:Null<String>

An optional human-readable description which is rendered less prominently in the title of the view. Setting the title description to null, undefined, or empty string will remove the description from the view.