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

Properties

onDidChangeEmitter: Emitter<DidChangeLabelEvent> = ...

Accessors

  • get fileIcon(): string
  • get folderIcon(): string

Methods

  • getIcon(element: object): string
  • getLongName(element: object): string
  • getName(element: object): string
  • initialize(): void
  • Start listening to contributions.

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

    Returns void