TreeItem

open class TreeItem(source)

A tree item is an UI element of the tree. Tree items are created by the data provider.

Online Documentation

Constructors

Link copied to clipboard
constructor(label: JsAny, collapsibleState: TreeItemCollapsibleState = definedExternally)
constructor(resourceUri: Uri, collapsibleState: TreeItemCollapsibleState = definedExternally)

Properties

Link copied to clipboard

Accessibility information used when screen reader interacts with this tree item. Generally, a TreeItem has no need to set the role of the accessibilityInformation; however, there are cases where a TreeItem is not displayed in a tree-like way where setting the role may make sense.

Link copied to clipboard

The Command that should be executed when the tree item is selected.

Link copied to clipboard

Context value of the tree item. This can be used to contribute item specific actions in the tree. For example, a tree item is given a context value as folder. When contributing actions to view/item/context using menus extension point, you can specify context value for key viewItem in when expression like viewItem == folder.

Link copied to clipboard

A human-readable string which is rendered less prominent. When true, it is derived from resourceUri and when falsy, it is not shown.

Link copied to clipboard

The icon path or ThemeIcon for the tree item. When falsy, Folder Theme Icon} is assigned, if item is collapsible otherwise {@link ThemeIcon.File File Theme Icon. When a file or folder ThemeIcon is specified, icon is derived from the current file icon theme for the specified theme icon using resourceUri (if provided).

Link copied to clipboard
var id: String?

Optional id for the tree item that has to be unique across tree. The id is used to preserve the selection and expansion state of the tree item.

Link copied to clipboard
var label: JsAny?

A human-readable string describing this item. When falsy, it is derived from resourceUri.

Link copied to clipboard

The Uri of the resource representing this item.

Link copied to clipboard

The tooltip text when you hover over this item.