Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TaskConfigurations

Watches a tasks.json configuration file and provides a parsed version of the contained task configurations

Hierarchy

  • TaskConfigurations

Implements

  • Disposable

Index

Constructors

constructor

Properties

Protected client

client: undefined | TaskConfigurationClient = ...

Protected Readonly providedTaskConfigurations

providedTaskConfigurations: ProvidedTaskConfigurations

Private rawTaskConfigurations

rawTaskConfigurations: Map<string, TaskCustomization[]> = ...

Map of source (path of root folder that the task configs come from) and raw task configurations / customizations. This map is used to store the data from tasks.json files in workspace.

Protected Readonly taskConfigurationManager

taskConfigurationManager: TaskConfigurationManager

Protected taskCustomizationMap

taskCustomizationMap: Map<string, TaskCustomization[]> = ...

Map of source (path of root folder that the task configs come from) and task customizations map.

Protected Readonly taskDefinitionRegistry

taskDefinitionRegistry: TaskDefinitionRegistry

Protected Readonly taskSchemaUpdater

taskSchemaUpdater: TaskSchemaUpdater

Protected Readonly taskSourceResolver

taskSourceResolver: TaskSourceResolver

Protected tasksMap

tasksMap: Map<string, Map<string, TaskConfiguration>> = ...

Map of source (path of root folder that the task configs come from) and task config map. For the inner map (i.e., task config map), the key is task label and value TaskConfiguration

Protected Readonly toDispose

toDispose: DisposableCollection = ...

Protected Readonly workspaceService

workspaceService: WorkspaceService

Methods

configure

dispose

  • dispose(): void

getCustomizationForTask

  • Returns the customization object in tasks.json for the given task. Please note, this function returns undefined if the given task is not a detected task, because configured tasks don't need customization objects - users can modify its config directly in tasks.json.

    Parameters

    • taskConfig: TaskConfiguration

      The task config, which could either be a configured task or a detected task.

    Returns undefined | TaskCustomization

getCustomizedTask

getInvalidTaskConfigurations

Private getKeyFromScope

getRawTaskConfigurations

Private getScopeFromKey

getTask

Private getTaskCustomizationTemplate

Private getTaskCustomizations

Private getTaskDefinition

getTaskLabels

  • getTaskLabels(): string[]

getTasks

Private getTransformedRawTask

Protected init

  • init(): void

Private isDetectedTask

Private isTaskConfigValid

Protected onDidTaskFileChange

  • onDidTaskFileChange(fileChanges: TasksChange[]): Promise<void>

openUserTasks

  • openUserTasks(): Promise<void>

Protected readTasks

Protected refreshTasks

Private removeTaskCustomizations

Private removeTasks

Protected reorganizeTasks

  • reorganizeTasks(): void

saveTask

setClient

updateTaskConfig

  • updateTaskConfig(token: number, task: TaskConfiguration, update: {}): Promise<void>
  • Updates the task config 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
    • task: TaskConfiguration

      task that the updates will be applied to

    • update: {}

      the updates to be applied

      • [name: string]: any

    Returns Promise<void>