Emit when something has changed that may result in this label provider returning a different value for one or more properties (name, icon etc).
Checks whether the given element is affected by the given change event. Contributions delegating to the label provider can use this hook to perform a recursive check.
Determines whether this contribution can handle the given element and with what priority. All contributions are ordered by the returned number if greater than zero. The highest number wins. If two or more contributions return the same positive number one of those will be used. It is undefined which one.
A compromise between getName and getLongName. Can be used to supplement getName in contexts that allow both a primary display field and extra detail.
returns an icon class for the given element.
returns a long name for the given element.
returns a short name for the given element.
A LabelProviderContribution determines how specific elements/nodes are displayed in the workbench. Theia views use a common LabelProvider to determine the label and/or an icon for elements shown in the UI. This includes elements in lists and trees, but also view specific locations like headers. The common LabelProvider collects all {@links LabelProviderContribution} and delegates to the contribution with the highest priority. This is determined via calling the LabelProviderContribution.canHandle function, so contributions define which elements they are responsible for. As arbitrary views can consume LabelProviderContributions, they must be generic for the covered element type, not view specific. Label providers and contributions can be used for arbitrary element and node types, e.g. for markers or domain-specific elements.