Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TaskProviderRegistry

The TaskProviderRegistry is the common component for registration and provision of TaskProviders. Theia will collect all TaskContributions and invoke {@link TaskContribution#registerProviders} for each contribution.

Hierarchy

  • TaskProviderRegistry

Index

Constructors

Properties

onWillProvideTaskProvider: Event<WillResolveTaskProvider> = ...

Emit when the registry provides a registered task provider. i.e. when the {@link TaskProviderRegistry#getProvider} function is called.

onWillProvideTaskProviderEmitter: Emitter<WillResolveTaskProvider> = ...
providers: Map<string, TaskProvider>

Methods

  • activateProvider(type: string): Promise<void>
  • getProvider(type: string): Promise<undefined | TaskProvider>
  • Retrieves the TaskProvider registered for the given type task configuration type. If there is already a TaskProvider registered for the specified type the registration will be overwritten with the new value.

    Parameters

    • type: string

      the task configuration type.

    Returns Promise<undefined | TaskProvider>

    a promise of the registered TaskProvider`` or undefined` if no provider is registered for the given type.

  • init(): void
  • register(type: string, provider: TaskProvider, handle?: number): Disposable
  • Registers the given TaskProvider for task configurations of the specified type

    Parameters

    • type: string

      the task configuration type for which the given provider should be registered.

    • provider: TaskProvider

      the TaskProvider that should be registered.

    • Optional handle: number

    Returns Disposable

    a Disposable that can be invoked to unregister the given resolver.