resolveTreeItem

abstract var resolveTreeItem: (item: TreeItem, element: T, token: CancellationToken) -> ProviderResult<TreeItem>?(source)

Called on hover to resolve the TreeItem property if it is undefined. Called on tree item click/open to resolve the TreeItem property if it is undefined. Only properties that were undefined can be resolved in resolveTreeItem. Functionality may be expanded later to include being called to resolve other missing properties on selection and/or on open.

Will only ever be called once per TreeItem.

onDidChangeTreeData should not be triggered from within resolveTreeItem.

Note that this function is called when tree items are already showing in the UI. Because of that, no property that changes the presentation (label, description, etc.) can be changed.

Parameters

item

Undefined properties of item should be set then item should be returned.

element

The object associated with the TreeItem.

token

A cancellation token.