Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • TaskService

Implements

Index

Constructors

Properties

app: FrontendApplication
cachedRecentTasks: TaskConfiguration[] = []
commands: CommandService
editorManager: EditorManager
labelProvider: LabelProvider
lastTask: LastRunTaskInfo = ...

The last executed task.

logger: ILogger
messageService: MessageService
monacoWorkspace: MonacoWorkspace
openerService: OpenerService
problemManager: ProblemManager
problemMatcherRegistry: ProblemMatcherRegistry
providedTaskConfigurations: ProvidedTaskConfigurations
quickPickService: QuickPickService
runningTasks: Map<number, { exitCode: Deferred<undefined | number>; isBackgroundTaskEnded: Deferred<undefined | boolean>; terminateSignal: Deferred<undefined | string> }> = ...
shell: ApplicationShell
shellTerminalServer: ShellTerminalServerProxy
taskConfigurationManager: TaskConfigurationManager
taskConfigurations: TaskConfigurations
taskDefinitionRegistry: TaskDefinitionRegistry
taskNameResolver: TaskNameResolver
taskResolverRegistry: TaskResolverRegistry
taskSchemaUpdater: TaskSchemaUpdater
taskServer: TaskServer
taskSourceResolver: TaskSourceResolver
taskStartingLock: Mutex = ...
taskTerminalWidgetManager: TaskTerminalWidgetManager
taskWatcher: TaskWatcher
terminalService: TerminalService
variableResolverService: VariableResolverService
widgetManager: WidgetManager
workspaceService: WorkspaceService

Accessors

Methods

  • attach(terminalId: number, taskInfo: TaskInfo): Promise<number | void>
  • clearRecentTasks(): void
  • customExecutionComplete(id: number, exitCode: undefined | number): Promise<void>
  • getContext(): undefined | string
  • Gets task configuration by task label or by a JSON object which represents a task identifier

    Parameters

    • taskIdentifier: string | TaskIdentifier

      The task label (string) or a JSON object which represents a TaskIdentifier (e.g. {"type":"npm", "script":"script1"})

    • tasks: TaskConfiguration[]

      an array of the task configurations

    Returns TaskConfiguration

    the correct TaskConfiguration object which matches the taskIdentifier

  • getExitCode(id: number): Promise<undefined | number>
  • Returns a task configuration provided by an extension by task source, scope and label. If there are no task configuration, returns undefined.

    Parameters

    • token: number

      The cache token for the user interaction in progress

    • source: string

      The source for configured tasks

    • label: string

      The label of the task to find

    • scope: TaskConfigurationScope

      The task scope to look in

    Returns Promise<undefined | TaskConfiguration>

  • Returns an array that contains the task configurations provided by the task providers for the specified task type.

    Parameters

    • token: number

      The cache token for the user interaction in progress

    • Optional type: string

      The task type (filter) associated to the returning TaskConfigurations

      '*' indicates all tasks regardless of the type

    Returns Promise<TaskConfiguration[]>

  • getRegisteredTaskTypes(): Promise<string[]>
  • Gets the matched task from an array of task configurations by TaskIdentifier. In case that more than one task configuration matches, we returns the first one.

    Parameters

    • taskIdentifier: TaskIdentifier

      The task label (string) or a JSON object which represents a TaskIdentifier (e.g. {"type":"npm", "script":"script1"})

    • tasks: TaskConfiguration[]

      An array of task configurations.

    Returns TaskConfiguration

    The correct TaskConfiguration object which matches the taskIdentifier.

  • getTerminalWidgetId(terminalId: number): undefined | string
  • getTerminateSignal(id: number): Promise<undefined | string>
  • init(): void
  • isBackgroundTaskEnded(id: number): Promise<undefined | boolean>
  • isEventForThisClient(context: undefined | string): boolean
  • kill(id: number): Promise<void>
  • openUserTasks(): Promise<void>
  • Runs a task, by the source and label of the task configuration. It looks for configured and detected tasks.

    Parameters

    • token: number

      The cache token for the user interaction in progress

    • source: string

      The source for configured tasks

    • taskLabel: string

      The label to look for

    • scope: TaskConfigurationScope

      The scope where to look for tasks

    Returns Promise<undefined | TaskInfo>

  • Runs a task, by task configuration label. Note, it looks for a task configured in tasks.json only.

    Parameters

    • token: number

      The cache token for the user interaction in progress

    • scope: TaskConfigurationScope

      The scope where to look for tasks

    • taskLabel: string

      the label to look for

    Returns Promise<void>

  • runLastTask(token: number): Promise<undefined | TaskInfo>
  • runSelectedText(): Promise<void>
  • runTaskByLabel(token: number, taskLabel: string): Promise<undefined | TaskInfo>
  • Runs the first task with the given label.

    Parameters

    • token: number

      The cache token for the user interaction in progress

    • taskLabel: string

      The label of the task to be executed

    Returns Promise<undefined | TaskInfo>

  • runWorkspaceTask(token: number, workspaceFolderUri: undefined | string, taskIdentifier: string | TaskIdentifier): Promise<undefined | TaskInfo>
  • Runs a task identified by the given identifier, but only if found in the given workspace folder

    Parameters

    • token: number

      The cache token for the user interaction in progress

    • workspaceFolderUri: undefined | string

      The folder to restrict the search to

    • taskIdentifier: string | TaskIdentifier

      The identifier to look for

    Returns Promise<undefined | TaskInfo>

  • startUserAction(): number
  • Client should call this method to indicate that a new user-level action related to tasks has been started, like invoking "Run Task..." This method returns a token that can be used with various methods in this service. As long as a client uses the same token, task providers will only asked once to contribute tasks and the set of tasks will be cached. Each time the a new token is used, the cache of contributed tasks is cleared.

    Returns number

    a token to be used for task-related actions

  • taskConfigurationChanged(event: string[]): void
  • terminateTask(activeTaskInfo: TaskInfo): Promise<void>
  • updateTaskConfiguration(token: number, task: TaskConfiguration, update: {}): Promise<void>
  • Updates the task configuration in the tasks.json. The task config, together with updates, will be written into the tasks.json if it is not found in the file.

    Parameters

    • token: number

      The cache token for the user interaction in progress

    • task: TaskConfiguration

      task that the updates will be applied to

    • update: {}

      the updates to be applied

      • [name: string]: any

    Returns Promise<void>