Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LabelProvider

The LabelProvider determines how elements/nodes are displayed in the workbench. For any element, it can determine a short label, a long label and an icon. The LabelProvider is to be used in lists, trees and tables, but also view specific locations like headers. The common LabelProvider can be extended/adapted via LabelProviderContributions. For every element, the {@links LabelProvider} will determine the LabelProviderContribution with the hightest priority and delegate to it. Theia registers default LabelProviderContribution for common types, e.g. the DefaultUriLabelProviderContribution for elements that have a URI. Using the LabelProvider across the workbench ensures a common look and feel for elements across multiple views. To adapt the way how specific elements/nodes are rendered, use a LabelProviderContribution rather than adapting or sub classing the LabelProvider. This way, your adaptation is applied to all views in Theia that use the LabelProvider

Hierarchy

  • LabelProvider

Implements

Index

Constructors

constructor

Properties

Protected Readonly contributionProvider

Protected Readonly onDidChangeEmitter

onDidChangeEmitter: Emitter<DidChangeLabelEvent> = ...

Accessors

fileIcon

  • get fileIcon(): string

folderIcon

  • get folderIcon(): string

onDidChange

Methods

Protected affects

Protected findContribution

getIcon

  • getIcon(element: object): string

getLongName

  • getLongName(element: object): string

getName

  • getName(element: object): string

initialize

  • initialize(): void
  • Start listening to contributions.

    Don't call this method directly! It's called by the frontend application during initialization.

    Returns void