AbstractProtected_Protected Readonly_Emits invalidation requests consumed by the adapter. Protected so a specialized provider can expose richer refresh methods without replacing the public event contract.
ReadonlyonFires when the user (un)checks a checkbox in the tree. The host bridges
the native event for any view declared with module.treeViews.add, so
there is nothing to wire up.
ReadonlyonEvent the platform subscribes to; emit through refresh.
Clears the internal child cache without emitting an invalidation event. Call refresh when the platform must immediately query again.
Releases emitters and cached data. Idempotent through the emitter implementation; subsequent child reads return an empty list.
AbstractgetOptionalgetAbstractgetRenders one element.
An element already is the row's data, so this normalises rather than
builds: it fills in the collapsible state and hands back plain data the
adapter turns into the platform's TreeItem. Override it to render an
element differently from how it is stored.
Tree item data
Refreshes the tree view.
Passing a specific element (rather than undefined) is the
partial-update path: VS Code only re-fetches that element's own
getTreeItem() rendering and its children, leaving the rest of the
tree's scroll position, selection, and expand/collapse state untouched.
Optionalelement: T
Specific element to refresh, or undefined for the entire tree
Notifies listeners that the given items' checkbox state changed. The host calls this; an application normally only listens.
The items that were checked or unchecked
Abstract base class for tree data providers.
A class on purpose, against this codebase's factory-function default, because subclassing is the interface: a provider is defined by what its
getRoots/getChildrenOfoverrides return, and a factory taking those two as callbacks would be the same thing with more ceremony.Example