Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TaskResolverRegistry

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

Hierarchy

  • TaskResolverRegistry

Index

Constructors

Properties

executionResolvers: Map<string, TaskResolver> = ...
onWillProvideTaskResolver: Event<WillResolveTaskProvider> = ...

Emit when the registry provides a registered resolver. i.e. when the {@link TaskResolverRegistry#getResolver} function is called.

onWillProvideTaskResolverEmitter: Emitter<WillResolveTaskProvider> = ...
taskResolvers: Map<string, TaskResolver> = ...

Methods

  • getExecutionResolver(executionType: string): undefined | TaskResolver
  • getResolver(type: string): Promise<undefined | TaskResolver>
  • Retrieves the TaskResolver registered for the given type task configuration type.

    deprecated

    since 1.12.0 use getTaskResolver() instead.

    Parameters

    • type: string

      the task configuration type

    Returns Promise<undefined | TaskResolver>

    a promise of the registered TaskResolver or undefined if no resolver is registered for the given type.

  • getTaskResolver(type: string): Promise<undefined | TaskResolver>
  • Registers the given TaskResolver to resolve the TaskConfiguration of the specified type. If there is already a TaskResolver registered for the specified type the registration will be overwritten with the new value.

    deprecated

    since 1.12.0 use registerTaskResolver instead.

    Parameters

    • type: string

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

    • resolver: TaskResolver

      the task resolver that should be registered.

    Returns Disposable

    a Disposable that can be invoked to unregister the given resolver

  • registerExecutionResolver(type: string, resolver: TaskResolver): Disposable
  • Registers the given TaskResolver to resolve the TaskConfiguration for the specified type of execution ('shell', 'process' or 'customExecution'). If there is already a TaskResolver registered for the specified type the registration will be overwritten with the new value.

    Parameters

    • type: string

      the task execution type for which the given resolver should be registered.

    • resolver: TaskResolver

      the task resolver that should be registered.

    Returns Disposable

    a Disposable that can be invoked to unregister the given resolver

  • registerTaskResolver(type: string, resolver: TaskResolver): Disposable
  • Registers the given TaskResolver to resolve the TaskConfiguration of the specified type. If there is already a TaskResolver registered for the specified type the registration will be overwritten with the new value.

    Parameters

    • type: string

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

    • resolver: TaskResolver

      the task resolver that should be registered.

    Returns Disposable

    a Disposable that can be invoked to unregister the given resolver