Optional
onAn optional event to signal that an element or root has changed.
This will trigger the view to update the changed element/root and its children recursively (if shown).
To signal that root has changed, do not pass any argument or pass undefined
or null
.
Get the children of element
or root if no element is passed.
Optional
element: TThe element from which the provider gets children. Can be undefined
.
Children of element
or root if no element is passed.
Optional
getOptional method to return the parent of element
.
Return null
or undefined
if element
is a child of root.
NOTE: This method should be implemented in order to access reveal API.
The element for which the parent has to be returned.
Parent of element
.
Optional
resolveCalled 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.
Undefined properties of item
should be set then item
should be returned.
The object associated with the TreeItem.
A cancellation token.
The resolved tree item or a thenable that resolves to such. It is OK to return the given
item
. When no result is returned, the given item
will be used.
A data provider that provides tree data