Theia API Documentation v1.77.0
    Preparing search index...

    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.

    Hierarchy (View Summary)

    Index
    envVariablesServer: EnvVariablesServer
    homePath: string | undefined
    onDidChangeEmitter: Emitter<DidChangeLabelEvent>
    rootNames: Map<string, string> = ...

    The names of the workspace roots by root URI, as last labeled.

    workspaceService: WorkspaceService
    • get defaultFileIcon(): string

      Returns string

    • get defaultFolderIcon(): string

      Returns string

    • get onDidChange(): Event<DidChangeLabelEvent>

      Emit when something has changed that may result in this label provider returning a different value for one or more properties (name, icon etc).

      Returns Event<DidChangeLabelEvent>

    • Returns the name given to the workspace root in the workspace file, or else its name from getName. Only used where the root is referred to as a root: elsewhere, e.g. in a file dialog, the name from the workspace file is not shown, as in VS Code.

      Parameters

      Returns string | undefined

    • Notifies a change of the labels of the roots whose names changed, such as a root named app that is named alice/app once a root bob/app is added, or a root that is given a name in the workspace file. The labels of the files in such a root change as well, as their details and breadcrumbs show the name of the root.

      Returns void