Readonly
idThe unique identifier of the decorator. Ought to be unique in the application.
Readonly
onFired when this decorator has calculated all the decoration data
for the tree nodes.
Computes the current decoration data
for the given tree. Might return a promise if the computation is handled asynchronously.
the tree to decorate.
(a promise of) a map containing the current {@linkTreeDecoration.Data} for each node. Keys are the unique identifier of the tree nodes.
The TreeDecorator allows adapting the look and the style of the tree items within a widget. Changes are reflected in the form of
decoration data
. Thisdecoration data
is a map storing TreeDecoration.Data for affected tree nodes (using the unique node id as key). It is important to notice that there is no common contribution point forTreeDecorators
. Instead, each TreeDecoratorService is supposed to declare its own contribution provider forTreeDecorators
.Example usage
A simple tree decorator that changes the background color of each tree node to
red
.