@codingame/monaco-vscode-task-service-override 3.2.3 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/task.js +2 -2
- package/external/tslib/tslib.es6.js +0 -11
- package/override/vs/platform/dialogs/common/dialogs.js +0 -8
- package/vscode/src/vs/base/common/parsers.js +0 -44
- package/vscode/src/vs/workbench/contrib/tasks/browser/abstractTaskService.js +0 -3855
- package/vscode/src/vs/workbench/contrib/tasks/browser/runAutomaticTasks.js +0 -185
- package/vscode/src/vs/workbench/contrib/tasks/browser/task.contribution.js +0 -684
- package/vscode/src/vs/workbench/contrib/tasks/browser/taskQuickPick.js +0 -452
- package/vscode/src/vs/workbench/contrib/tasks/browser/taskService.js +0 -36
- package/vscode/src/vs/workbench/contrib/tasks/browser/taskTerminalStatus.js +0 -191
- package/vscode/src/vs/workbench/contrib/tasks/browser/tasksQuickAccess.js +0 -121
- package/vscode/src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.js +0 -1713
- package/vscode/src/vs/workbench/contrib/tasks/common/jsonSchemaCommon.js +0 -440
- package/vscode/src/vs/workbench/contrib/tasks/common/jsonSchema_v1.js +0 -125
- package/vscode/src/vs/workbench/contrib/tasks/common/jsonSchema_v2.js +0 -901
- package/vscode/src/vs/workbench/contrib/tasks/common/problemCollectors.js +0 -465
- package/vscode/src/vs/workbench/contrib/tasks/common/problemMatcher.js +0 -1796
- package/vscode/src/vs/workbench/contrib/tasks/common/taskConfiguration.js +0 -1581
- package/vscode/src/vs/workbench/contrib/tasks/common/taskSystem.js +0 -15
- package/vscode/src/vs/workbench/contrib/tasks/common/taskTemplates.js +0 -145
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEscapeSequences.js +0 -13
|
@@ -1,684 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { localizeWithPath, localize2WithPath } from 'vscode/vscode/vs/nls';
|
|
3
|
-
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
|
-
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
5
|
-
import { registerAction2, MenuRegistry, MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
6
|
-
import { ProblemMatcherRegistry } from '../common/problemMatcher.js';
|
|
7
|
-
import { IProgressService } from 'vscode/vscode/vs/platform/progress/common/progress';
|
|
8
|
-
import { Extensions as Extensions$3 } from 'vscode/vscode/vs/platform/jsonschemas/common/jsonContributionRegistry';
|
|
9
|
-
import { IStatusbarService } from 'vscode/vscode/vs/workbench/services/statusbar/browser/statusbar';
|
|
10
|
-
import { Extensions as Extensions$1 } from 'vscode/vscode/vs/workbench/services/output/common/output';
|
|
11
|
-
import { TASKS_CATEGORY, TASK_RUNNING_STATE, TaskGroup } from 'vscode/vscode/vs/workbench/contrib/tasks/common/tasks';
|
|
12
|
-
import { TaskExecutionSupportedContext, TaskCommandsRegistered, ITaskService } from 'vscode/vscode/vs/workbench/contrib/tasks/common/taskService';
|
|
13
|
-
import { Extensions } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
14
|
-
import { RunAutomaticTasks, ManageAutomaticTaskRunning } from './runAutomaticTasks.js';
|
|
15
|
-
import { KeybindingsRegistry } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
16
|
-
import schema$1 from '../common/jsonSchema_v1.js';
|
|
17
|
-
import schema$2, { updateProblemMatchers, updateTaskDefinitions } from '../common/jsonSchema_v2.js';
|
|
18
|
-
import { ConfigureTaskAction, AbstractTaskService } from './abstractTaskService.js';
|
|
19
|
-
import { tasksSchemaId } from 'vscode/vscode/vs/workbench/services/configuration/common/configuration';
|
|
20
|
-
import { Extensions as Extensions$4 } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
21
|
-
import { WorkbenchStateContext } from 'vscode/vscode/vs/workbench/common/contextkeys';
|
|
22
|
-
import { Extensions as Extensions$2 } from 'vscode/vscode/vs/platform/quickinput/common/quickAccess';
|
|
23
|
-
import { TasksQuickAccessProvider } from './tasksQuickAccess.js';
|
|
24
|
-
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
25
|
-
import { TaskDefinitionRegistry } from 'vscode/vscode/vs/workbench/contrib/tasks/common/taskDefinitionRegistry';
|
|
26
|
-
import { isString } from 'vscode/vscode/vs/base/common/types';
|
|
27
|
-
import { promiseWithResolvers } from 'vscode/vscode/vs/base/common/async';
|
|
28
|
-
|
|
29
|
-
const workbenchRegistry = ( Registry.as(Extensions.Workbench));
|
|
30
|
-
workbenchRegistry.registerWorkbenchContribution(RunAutomaticTasks, 4 );
|
|
31
|
-
registerAction2(ManageAutomaticTaskRunning);
|
|
32
|
-
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
33
|
-
command: {
|
|
34
|
-
id: ManageAutomaticTaskRunning.ID,
|
|
35
|
-
title: ManageAutomaticTaskRunning.LABEL,
|
|
36
|
-
category: TASKS_CATEGORY
|
|
37
|
-
},
|
|
38
|
-
when: TaskExecutionSupportedContext
|
|
39
|
-
});
|
|
40
|
-
let TaskStatusBarContributions = class TaskStatusBarContributions extends Disposable {
|
|
41
|
-
constructor(_taskService, _statusbarService, _progressService) {
|
|
42
|
-
super();
|
|
43
|
-
this._taskService = _taskService;
|
|
44
|
-
this._statusbarService = _statusbarService;
|
|
45
|
-
this._progressService = _progressService;
|
|
46
|
-
this._activeTasksCount = 0;
|
|
47
|
-
this._registerListeners();
|
|
48
|
-
}
|
|
49
|
-
_registerListeners() {
|
|
50
|
-
let promise = undefined;
|
|
51
|
-
let resolve;
|
|
52
|
-
this._taskService.onDidStateChange(event => {
|
|
53
|
-
if (event.kind === "changed" ) {
|
|
54
|
-
this._updateRunningTasksStatus();
|
|
55
|
-
}
|
|
56
|
-
if (!this._ignoreEventForUpdateRunningTasksCount(event)) {
|
|
57
|
-
switch (event.kind) {
|
|
58
|
-
case "active" :
|
|
59
|
-
this._activeTasksCount++;
|
|
60
|
-
if (this._activeTasksCount === 1) {
|
|
61
|
-
if (!promise) {
|
|
62
|
-
({ promise, resolve } = promiseWithResolvers());
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
break;
|
|
66
|
-
case "inactive" :
|
|
67
|
-
if (this._activeTasksCount > 0) {
|
|
68
|
-
this._activeTasksCount--;
|
|
69
|
-
if (this._activeTasksCount === 0) {
|
|
70
|
-
if (promise && resolve) {
|
|
71
|
-
resolve();
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
break;
|
|
76
|
-
case "terminated" :
|
|
77
|
-
if (this._activeTasksCount !== 0) {
|
|
78
|
-
this._activeTasksCount = 0;
|
|
79
|
-
if (promise && resolve) {
|
|
80
|
-
resolve();
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
break;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
if (promise && ((event.kind === "active") ) && (this._activeTasksCount === 1)) {
|
|
87
|
-
this._progressService.withProgress({ location: 10 , command: 'workbench.action.tasks.showTasks', type: 'loading' }, progress => {
|
|
88
|
-
progress.report({ message: ( localizeWithPath(
|
|
89
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
90
|
-
'building',
|
|
91
|
-
'Building...'
|
|
92
|
-
)) });
|
|
93
|
-
return promise;
|
|
94
|
-
}).then(() => {
|
|
95
|
-
promise = undefined;
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
async _updateRunningTasksStatus() {
|
|
101
|
-
const tasks = await this._taskService.getActiveTasks();
|
|
102
|
-
if (tasks.length === 0) {
|
|
103
|
-
if (this._runningTasksStatusItem) {
|
|
104
|
-
this._runningTasksStatusItem.dispose();
|
|
105
|
-
this._runningTasksStatusItem = undefined;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
else {
|
|
109
|
-
const itemProps = {
|
|
110
|
-
name: ( localizeWithPath(
|
|
111
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
112
|
-
'status.runningTasks',
|
|
113
|
-
"Running Tasks"
|
|
114
|
-
)),
|
|
115
|
-
text: `$(tools) ${tasks.length}`,
|
|
116
|
-
ariaLabel: ( localizeWithPath(
|
|
117
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
118
|
-
'numberOfRunningTasks',
|
|
119
|
-
"{0} running tasks",
|
|
120
|
-
tasks.length
|
|
121
|
-
)),
|
|
122
|
-
tooltip: ( localizeWithPath(
|
|
123
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
124
|
-
'runningTasks',
|
|
125
|
-
"Show Running Tasks"
|
|
126
|
-
)),
|
|
127
|
-
command: 'workbench.action.tasks.showTasks',
|
|
128
|
-
};
|
|
129
|
-
if (!this._runningTasksStatusItem) {
|
|
130
|
-
this._runningTasksStatusItem = this._statusbarService.addEntry(itemProps, 'status.runningTasks', 0 , 49 );
|
|
131
|
-
}
|
|
132
|
-
else {
|
|
133
|
-
this._runningTasksStatusItem.update(itemProps);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
_ignoreEventForUpdateRunningTasksCount(event) {
|
|
138
|
-
if (!this._taskService.inTerminal() || event.kind === "changed" ) {
|
|
139
|
-
return false;
|
|
140
|
-
}
|
|
141
|
-
if ((isString(event.group) ? event.group : event.group?._id) !== TaskGroup.Build._id) {
|
|
142
|
-
return true;
|
|
143
|
-
}
|
|
144
|
-
return event.__task.configurationProperties.problemMatchers === undefined || event.__task.configurationProperties.problemMatchers.length === 0;
|
|
145
|
-
}
|
|
146
|
-
};
|
|
147
|
-
TaskStatusBarContributions = ( __decorate([
|
|
148
|
-
( __param(0, ITaskService)),
|
|
149
|
-
( __param(1, IStatusbarService)),
|
|
150
|
-
( __param(2, IProgressService))
|
|
151
|
-
], TaskStatusBarContributions));
|
|
152
|
-
workbenchRegistry.registerWorkbenchContribution(TaskStatusBarContributions, 3 );
|
|
153
|
-
MenuRegistry.appendMenuItem(MenuId.MenubarTerminalMenu, {
|
|
154
|
-
group: "2_run" ,
|
|
155
|
-
command: {
|
|
156
|
-
id: 'workbench.action.tasks.runTask',
|
|
157
|
-
title: ( localizeWithPath(
|
|
158
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
159
|
-
{ key: 'miRunTask', comment: ['&& denotes a mnemonic'] },
|
|
160
|
-
"&&Run Task..."
|
|
161
|
-
))
|
|
162
|
-
},
|
|
163
|
-
order: 1,
|
|
164
|
-
when: TaskExecutionSupportedContext
|
|
165
|
-
});
|
|
166
|
-
MenuRegistry.appendMenuItem(MenuId.MenubarTerminalMenu, {
|
|
167
|
-
group: "2_run" ,
|
|
168
|
-
command: {
|
|
169
|
-
id: 'workbench.action.tasks.build',
|
|
170
|
-
title: ( localizeWithPath(
|
|
171
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
172
|
-
{ key: 'miBuildTask', comment: ['&& denotes a mnemonic'] },
|
|
173
|
-
"Run &&Build Task..."
|
|
174
|
-
))
|
|
175
|
-
},
|
|
176
|
-
order: 2,
|
|
177
|
-
when: TaskExecutionSupportedContext
|
|
178
|
-
});
|
|
179
|
-
MenuRegistry.appendMenuItem(MenuId.MenubarTerminalMenu, {
|
|
180
|
-
group: "3_manage" ,
|
|
181
|
-
command: {
|
|
182
|
-
precondition: TASK_RUNNING_STATE,
|
|
183
|
-
id: 'workbench.action.tasks.showTasks',
|
|
184
|
-
title: ( localizeWithPath(
|
|
185
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
186
|
-
{ key: 'miRunningTask', comment: ['&& denotes a mnemonic'] },
|
|
187
|
-
"Show Runnin&&g Tasks..."
|
|
188
|
-
))
|
|
189
|
-
},
|
|
190
|
-
order: 1,
|
|
191
|
-
when: TaskExecutionSupportedContext
|
|
192
|
-
});
|
|
193
|
-
MenuRegistry.appendMenuItem(MenuId.MenubarTerminalMenu, {
|
|
194
|
-
group: "3_manage" ,
|
|
195
|
-
command: {
|
|
196
|
-
precondition: TASK_RUNNING_STATE,
|
|
197
|
-
id: 'workbench.action.tasks.restartTask',
|
|
198
|
-
title: ( localizeWithPath(
|
|
199
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
200
|
-
{ key: 'miRestartTask', comment: ['&& denotes a mnemonic'] },
|
|
201
|
-
"R&&estart Running Task..."
|
|
202
|
-
))
|
|
203
|
-
},
|
|
204
|
-
order: 2,
|
|
205
|
-
when: TaskExecutionSupportedContext
|
|
206
|
-
});
|
|
207
|
-
MenuRegistry.appendMenuItem(MenuId.MenubarTerminalMenu, {
|
|
208
|
-
group: "3_manage" ,
|
|
209
|
-
command: {
|
|
210
|
-
precondition: TASK_RUNNING_STATE,
|
|
211
|
-
id: 'workbench.action.tasks.terminate',
|
|
212
|
-
title: ( localizeWithPath(
|
|
213
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
214
|
-
{ key: 'miTerminateTask', comment: ['&& denotes a mnemonic'] },
|
|
215
|
-
"&&Terminate Task..."
|
|
216
|
-
))
|
|
217
|
-
},
|
|
218
|
-
order: 3,
|
|
219
|
-
when: TaskExecutionSupportedContext
|
|
220
|
-
});
|
|
221
|
-
MenuRegistry.appendMenuItem(MenuId.MenubarTerminalMenu, {
|
|
222
|
-
group: "4_configure" ,
|
|
223
|
-
command: {
|
|
224
|
-
id: 'workbench.action.tasks.configureTaskRunner',
|
|
225
|
-
title: ( localizeWithPath(
|
|
226
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
227
|
-
{ key: 'miConfigureTask', comment: ['&& denotes a mnemonic'] },
|
|
228
|
-
"&&Configure Tasks..."
|
|
229
|
-
))
|
|
230
|
-
},
|
|
231
|
-
order: 1,
|
|
232
|
-
when: TaskExecutionSupportedContext
|
|
233
|
-
});
|
|
234
|
-
MenuRegistry.appendMenuItem(MenuId.MenubarTerminalMenu, {
|
|
235
|
-
group: "4_configure" ,
|
|
236
|
-
command: {
|
|
237
|
-
id: 'workbench.action.tasks.configureDefaultBuildTask',
|
|
238
|
-
title: ( localizeWithPath(
|
|
239
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
240
|
-
{ key: 'miConfigureBuildTask', comment: ['&& denotes a mnemonic'] },
|
|
241
|
-
"Configure De&&fault Build Task..."
|
|
242
|
-
))
|
|
243
|
-
},
|
|
244
|
-
order: 2,
|
|
245
|
-
when: TaskExecutionSupportedContext
|
|
246
|
-
});
|
|
247
|
-
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
248
|
-
command: {
|
|
249
|
-
id: 'workbench.action.tasks.openWorkspaceFileTasks',
|
|
250
|
-
title: ( localize2WithPath(
|
|
251
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
252
|
-
'workbench.action.tasks.openWorkspaceFileTasks',
|
|
253
|
-
"Open Workspace Tasks"
|
|
254
|
-
)),
|
|
255
|
-
category: TASKS_CATEGORY
|
|
256
|
-
},
|
|
257
|
-
when: ( ContextKeyExpr.and(( WorkbenchStateContext.isEqualTo('workspace')), TaskExecutionSupportedContext))
|
|
258
|
-
});
|
|
259
|
-
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
260
|
-
command: {
|
|
261
|
-
id: ConfigureTaskAction.ID,
|
|
262
|
-
title: ConfigureTaskAction.TEXT,
|
|
263
|
-
category: TASKS_CATEGORY
|
|
264
|
-
},
|
|
265
|
-
when: TaskExecutionSupportedContext
|
|
266
|
-
});
|
|
267
|
-
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
268
|
-
command: {
|
|
269
|
-
id: 'workbench.action.tasks.showLog',
|
|
270
|
-
title: ( localize2WithPath(
|
|
271
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
272
|
-
'ShowLogAction.label',
|
|
273
|
-
"Show Task Log"
|
|
274
|
-
)),
|
|
275
|
-
category: TASKS_CATEGORY
|
|
276
|
-
},
|
|
277
|
-
when: TaskExecutionSupportedContext
|
|
278
|
-
});
|
|
279
|
-
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
280
|
-
command: {
|
|
281
|
-
id: 'workbench.action.tasks.runTask',
|
|
282
|
-
title: ( localize2WithPath(
|
|
283
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
284
|
-
'RunTaskAction.label',
|
|
285
|
-
"Run Task"
|
|
286
|
-
)),
|
|
287
|
-
category: TASKS_CATEGORY
|
|
288
|
-
}
|
|
289
|
-
});
|
|
290
|
-
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
291
|
-
command: {
|
|
292
|
-
id: 'workbench.action.tasks.reRunTask',
|
|
293
|
-
title: ( localize2WithPath(
|
|
294
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
295
|
-
'ReRunTaskAction.label',
|
|
296
|
-
"Rerun Last Task"
|
|
297
|
-
)),
|
|
298
|
-
category: TASKS_CATEGORY
|
|
299
|
-
},
|
|
300
|
-
when: TaskExecutionSupportedContext
|
|
301
|
-
});
|
|
302
|
-
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
303
|
-
command: {
|
|
304
|
-
id: 'workbench.action.tasks.restartTask',
|
|
305
|
-
title: ( localize2WithPath(
|
|
306
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
307
|
-
'RestartTaskAction.label',
|
|
308
|
-
"Restart Running Task"
|
|
309
|
-
)),
|
|
310
|
-
category: TASKS_CATEGORY
|
|
311
|
-
},
|
|
312
|
-
when: TaskExecutionSupportedContext
|
|
313
|
-
});
|
|
314
|
-
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
315
|
-
command: {
|
|
316
|
-
id: 'workbench.action.tasks.showTasks',
|
|
317
|
-
title: ( localize2WithPath(
|
|
318
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
319
|
-
'ShowTasksAction.label',
|
|
320
|
-
"Show Running Tasks"
|
|
321
|
-
)),
|
|
322
|
-
category: TASKS_CATEGORY
|
|
323
|
-
},
|
|
324
|
-
when: TaskExecutionSupportedContext
|
|
325
|
-
});
|
|
326
|
-
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
327
|
-
command: {
|
|
328
|
-
id: 'workbench.action.tasks.terminate',
|
|
329
|
-
title: ( localize2WithPath(
|
|
330
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
331
|
-
'TerminateAction.label',
|
|
332
|
-
"Terminate Task"
|
|
333
|
-
)),
|
|
334
|
-
category: TASKS_CATEGORY
|
|
335
|
-
},
|
|
336
|
-
when: TaskExecutionSupportedContext
|
|
337
|
-
});
|
|
338
|
-
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
339
|
-
command: {
|
|
340
|
-
id: 'workbench.action.tasks.build',
|
|
341
|
-
title: ( localize2WithPath(
|
|
342
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
343
|
-
'BuildAction.label',
|
|
344
|
-
"Run Build Task"
|
|
345
|
-
)),
|
|
346
|
-
category: TASKS_CATEGORY
|
|
347
|
-
},
|
|
348
|
-
when: TaskExecutionSupportedContext
|
|
349
|
-
});
|
|
350
|
-
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
351
|
-
command: {
|
|
352
|
-
id: 'workbench.action.tasks.test',
|
|
353
|
-
title: ( localize2WithPath(
|
|
354
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
355
|
-
'TestAction.label',
|
|
356
|
-
"Run Test Task"
|
|
357
|
-
)),
|
|
358
|
-
category: TASKS_CATEGORY
|
|
359
|
-
},
|
|
360
|
-
when: TaskExecutionSupportedContext
|
|
361
|
-
});
|
|
362
|
-
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
363
|
-
command: {
|
|
364
|
-
id: 'workbench.action.tasks.configureDefaultBuildTask',
|
|
365
|
-
title: ( localize2WithPath(
|
|
366
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
367
|
-
'ConfigureDefaultBuildTask.label',
|
|
368
|
-
"Configure Default Build Task"
|
|
369
|
-
)),
|
|
370
|
-
category: TASKS_CATEGORY
|
|
371
|
-
},
|
|
372
|
-
when: TaskExecutionSupportedContext
|
|
373
|
-
});
|
|
374
|
-
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
375
|
-
command: {
|
|
376
|
-
id: 'workbench.action.tasks.configureDefaultTestTask',
|
|
377
|
-
title: ( localize2WithPath(
|
|
378
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
379
|
-
'ConfigureDefaultTestTask.label',
|
|
380
|
-
"Configure Default Test Task"
|
|
381
|
-
)),
|
|
382
|
-
category: TASKS_CATEGORY
|
|
383
|
-
},
|
|
384
|
-
when: TaskExecutionSupportedContext
|
|
385
|
-
});
|
|
386
|
-
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
387
|
-
command: {
|
|
388
|
-
id: 'workbench.action.tasks.openUserTasks',
|
|
389
|
-
title: ( localize2WithPath(
|
|
390
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
391
|
-
'workbench.action.tasks.openUserTasks',
|
|
392
|
-
"Open User Tasks"
|
|
393
|
-
)), category: TASKS_CATEGORY
|
|
394
|
-
},
|
|
395
|
-
when: TaskExecutionSupportedContext
|
|
396
|
-
});
|
|
397
|
-
class UserTasksGlobalActionContribution extends Disposable {
|
|
398
|
-
constructor() {
|
|
399
|
-
super();
|
|
400
|
-
this.registerActions();
|
|
401
|
-
}
|
|
402
|
-
registerActions() {
|
|
403
|
-
const id = 'workbench.action.tasks.openUserTasks';
|
|
404
|
-
const title = ( localizeWithPath(
|
|
405
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
406
|
-
'userTasks',
|
|
407
|
-
"User Tasks"
|
|
408
|
-
));
|
|
409
|
-
this._register(MenuRegistry.appendMenuItem(MenuId.GlobalActivity, {
|
|
410
|
-
command: {
|
|
411
|
-
id,
|
|
412
|
-
title
|
|
413
|
-
},
|
|
414
|
-
when: TaskExecutionSupportedContext,
|
|
415
|
-
group: '2_configuration',
|
|
416
|
-
order: 6
|
|
417
|
-
}));
|
|
418
|
-
this._register(MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, {
|
|
419
|
-
command: {
|
|
420
|
-
id,
|
|
421
|
-
title
|
|
422
|
-
},
|
|
423
|
-
when: TaskExecutionSupportedContext,
|
|
424
|
-
group: '2_configuration',
|
|
425
|
-
order: 6
|
|
426
|
-
}));
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
workbenchRegistry.registerWorkbenchContribution(UserTasksGlobalActionContribution, 3 );
|
|
430
|
-
KeybindingsRegistry.registerKeybindingRule({
|
|
431
|
-
id: 'workbench.action.tasks.build',
|
|
432
|
-
weight: 200 ,
|
|
433
|
-
when: TaskCommandsRegistered,
|
|
434
|
-
primary: 2048 | 1024 | 32
|
|
435
|
-
});
|
|
436
|
-
const outputChannelRegistry = ( Registry.as(Extensions$1.OutputChannels));
|
|
437
|
-
outputChannelRegistry.registerChannel({ id: AbstractTaskService.OutputChannelId, label: AbstractTaskService.OutputChannelLabel, log: false });
|
|
438
|
-
const quickAccessRegistry = (( Registry.as(Extensions$2.Quickaccess)));
|
|
439
|
-
const tasksPickerContextKey = 'inTasksPicker';
|
|
440
|
-
quickAccessRegistry.registerQuickAccessProvider({
|
|
441
|
-
ctor: TasksQuickAccessProvider,
|
|
442
|
-
prefix: TasksQuickAccessProvider.PREFIX,
|
|
443
|
-
contextKey: tasksPickerContextKey,
|
|
444
|
-
placeholder: ( localizeWithPath(
|
|
445
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
446
|
-
'tasksQuickAccessPlaceholder',
|
|
447
|
-
"Type the name of a task to run."
|
|
448
|
-
)),
|
|
449
|
-
helpEntries: [{ description: ( localizeWithPath(
|
|
450
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
451
|
-
'tasksQuickAccessHelp',
|
|
452
|
-
"Run Task"
|
|
453
|
-
)), commandCenterOrder: 60 }]
|
|
454
|
-
});
|
|
455
|
-
const schema = {
|
|
456
|
-
id: tasksSchemaId,
|
|
457
|
-
description: 'Task definition file',
|
|
458
|
-
type: 'object',
|
|
459
|
-
allowTrailingCommas: true,
|
|
460
|
-
allowComments: true,
|
|
461
|
-
default: {
|
|
462
|
-
version: '2.0.0',
|
|
463
|
-
tasks: [
|
|
464
|
-
{
|
|
465
|
-
label: 'My Task',
|
|
466
|
-
command: 'echo hello',
|
|
467
|
-
type: 'shell',
|
|
468
|
-
args: [],
|
|
469
|
-
problemMatcher: ['$tsc'],
|
|
470
|
-
presentation: {
|
|
471
|
-
reveal: 'always'
|
|
472
|
-
},
|
|
473
|
-
group: 'build'
|
|
474
|
-
}
|
|
475
|
-
]
|
|
476
|
-
}
|
|
477
|
-
};
|
|
478
|
-
schema.definitions = {
|
|
479
|
-
...schema$1.definitions,
|
|
480
|
-
...schema$2.definitions,
|
|
481
|
-
};
|
|
482
|
-
schema.oneOf = [...(schema$2.oneOf || []), ...(schema$1.oneOf || [])];
|
|
483
|
-
const jsonRegistry = ( Registry.as(Extensions$3.JSONContribution));
|
|
484
|
-
jsonRegistry.registerSchema(tasksSchemaId, schema);
|
|
485
|
-
ProblemMatcherRegistry.onMatcherChanged(() => {
|
|
486
|
-
updateProblemMatchers();
|
|
487
|
-
jsonRegistry.notifySchemaChanged(tasksSchemaId);
|
|
488
|
-
});
|
|
489
|
-
TaskDefinitionRegistry.onDefinitionsChanged(() => {
|
|
490
|
-
updateTaskDefinitions();
|
|
491
|
-
jsonRegistry.notifySchemaChanged(tasksSchemaId);
|
|
492
|
-
});
|
|
493
|
-
const configurationRegistry = ( Registry.as(Extensions$4.Configuration));
|
|
494
|
-
configurationRegistry.registerConfiguration({
|
|
495
|
-
id: 'task',
|
|
496
|
-
order: 100,
|
|
497
|
-
title: ( localizeWithPath(
|
|
498
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
499
|
-
'tasksConfigurationTitle',
|
|
500
|
-
"Tasks"
|
|
501
|
-
)),
|
|
502
|
-
type: 'object',
|
|
503
|
-
properties: {
|
|
504
|
-
["task.problemMatchers.neverPrompt" ]: {
|
|
505
|
-
markdownDescription: ( localizeWithPath(
|
|
506
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
507
|
-
'task.problemMatchers.neverPrompt',
|
|
508
|
-
"Configures whether to show the problem matcher prompt when running a task. Set to `true` to never prompt, or use a dictionary of task types to turn off prompting only for specific task types."
|
|
509
|
-
)),
|
|
510
|
-
'oneOf': [
|
|
511
|
-
{
|
|
512
|
-
type: 'boolean',
|
|
513
|
-
markdownDescription: ( localizeWithPath(
|
|
514
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
515
|
-
'task.problemMatchers.neverPrompt.boolean',
|
|
516
|
-
'Sets problem matcher prompting behavior for all tasks.'
|
|
517
|
-
))
|
|
518
|
-
},
|
|
519
|
-
{
|
|
520
|
-
type: 'object',
|
|
521
|
-
patternProperties: {
|
|
522
|
-
'.*': {
|
|
523
|
-
type: 'boolean'
|
|
524
|
-
}
|
|
525
|
-
},
|
|
526
|
-
markdownDescription: ( localizeWithPath(
|
|
527
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
528
|
-
'task.problemMatchers.neverPrompt.array',
|
|
529
|
-
'An object containing task type-boolean pairs to never prompt for problem matchers on.'
|
|
530
|
-
)),
|
|
531
|
-
default: {
|
|
532
|
-
'shell': true
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
],
|
|
536
|
-
default: false
|
|
537
|
-
},
|
|
538
|
-
["task.autoDetect" ]: {
|
|
539
|
-
markdownDescription: ( localizeWithPath(
|
|
540
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
541
|
-
'task.autoDetect',
|
|
542
|
-
"Controls enablement of `provideTasks` for all task provider extension. If the Tasks: Run Task command is slow, disabling auto detect for task providers may help. Individual extensions may also provide settings that disable auto detection."
|
|
543
|
-
)),
|
|
544
|
-
type: 'string',
|
|
545
|
-
enum: ['on', 'off'],
|
|
546
|
-
default: 'on'
|
|
547
|
-
},
|
|
548
|
-
["task.slowProviderWarning" ]: {
|
|
549
|
-
markdownDescription: ( localizeWithPath(
|
|
550
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
551
|
-
'task.slowProviderWarning',
|
|
552
|
-
"Configures whether a warning is shown when a provider is slow"
|
|
553
|
-
)),
|
|
554
|
-
'oneOf': [
|
|
555
|
-
{
|
|
556
|
-
type: 'boolean',
|
|
557
|
-
markdownDescription: ( localizeWithPath(
|
|
558
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
559
|
-
'task.slowProviderWarning.boolean',
|
|
560
|
-
'Sets the slow provider warning for all tasks.'
|
|
561
|
-
))
|
|
562
|
-
},
|
|
563
|
-
{
|
|
564
|
-
type: 'array',
|
|
565
|
-
items: {
|
|
566
|
-
type: 'string',
|
|
567
|
-
markdownDescription: ( localizeWithPath(
|
|
568
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
569
|
-
'task.slowProviderWarning.array',
|
|
570
|
-
'An array of task types to never show the slow provider warning.'
|
|
571
|
-
))
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
],
|
|
575
|
-
default: true
|
|
576
|
-
},
|
|
577
|
-
["task.quickOpen.history" ]: {
|
|
578
|
-
markdownDescription: ( localizeWithPath(
|
|
579
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
580
|
-
'task.quickOpen.history',
|
|
581
|
-
"Controls the number of recent items tracked in task quick open dialog."
|
|
582
|
-
)),
|
|
583
|
-
type: 'number',
|
|
584
|
-
default: 30, minimum: 0, maximum: 30
|
|
585
|
-
},
|
|
586
|
-
["task.quickOpen.detail" ]: {
|
|
587
|
-
markdownDescription: ( localizeWithPath(
|
|
588
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
589
|
-
'task.quickOpen.detail',
|
|
590
|
-
"Controls whether to show the task detail for tasks that have a detail in task quick picks, such as Run Task."
|
|
591
|
-
)),
|
|
592
|
-
type: 'boolean',
|
|
593
|
-
default: true
|
|
594
|
-
},
|
|
595
|
-
["task.quickOpen.skip" ]: {
|
|
596
|
-
type: 'boolean',
|
|
597
|
-
description: ( localizeWithPath(
|
|
598
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
599
|
-
'task.quickOpen.skip',
|
|
600
|
-
"Controls whether the task quick pick is skipped when there is only one task to pick from."
|
|
601
|
-
)),
|
|
602
|
-
default: false
|
|
603
|
-
},
|
|
604
|
-
["task.quickOpen.showAll" ]: {
|
|
605
|
-
type: 'boolean',
|
|
606
|
-
description: ( localizeWithPath(
|
|
607
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
608
|
-
'task.quickOpen.showAll',
|
|
609
|
-
"Causes the Tasks: Run Task command to use the slower \"show all\" behavior instead of the faster two level picker where tasks are grouped by provider."
|
|
610
|
-
)),
|
|
611
|
-
default: false
|
|
612
|
-
},
|
|
613
|
-
["task.allowAutomaticTasks" ]: {
|
|
614
|
-
type: 'string',
|
|
615
|
-
enum: ['on', 'off'],
|
|
616
|
-
enumDescriptions: [
|
|
617
|
-
( localizeWithPath(
|
|
618
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
619
|
-
'task.allowAutomaticTasks.on',
|
|
620
|
-
"Always"
|
|
621
|
-
)),
|
|
622
|
-
( localizeWithPath(
|
|
623
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
624
|
-
'task.allowAutomaticTasks.off',
|
|
625
|
-
"Never"
|
|
626
|
-
)),
|
|
627
|
-
],
|
|
628
|
-
description: ( localizeWithPath(
|
|
629
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
630
|
-
'task.allowAutomaticTasks',
|
|
631
|
-
"Enable automatic tasks - note that tasks won't run in an untrusted workspace."
|
|
632
|
-
)),
|
|
633
|
-
default: 'on',
|
|
634
|
-
restricted: true
|
|
635
|
-
},
|
|
636
|
-
["task.reconnection" ]: {
|
|
637
|
-
type: 'boolean',
|
|
638
|
-
description: ( localizeWithPath(
|
|
639
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
640
|
-
'task.reconnection',
|
|
641
|
-
"On window reload, reconnect to tasks that have problem matchers."
|
|
642
|
-
)),
|
|
643
|
-
default: true
|
|
644
|
-
},
|
|
645
|
-
["task.saveBeforeRun" ]: {
|
|
646
|
-
markdownDescription: ( localizeWithPath(
|
|
647
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
648
|
-
'task.saveBeforeRun',
|
|
649
|
-
'Save all dirty editors before running a task.'
|
|
650
|
-
)),
|
|
651
|
-
type: 'string',
|
|
652
|
-
enum: ['always', 'never', 'prompt'],
|
|
653
|
-
enumDescriptions: [
|
|
654
|
-
( localizeWithPath(
|
|
655
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
656
|
-
'task.saveBeforeRun.always',
|
|
657
|
-
'Always saves all editors before running.'
|
|
658
|
-
)),
|
|
659
|
-
( localizeWithPath(
|
|
660
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
661
|
-
'task.saveBeforeRun.never',
|
|
662
|
-
'Never saves editors before running.'
|
|
663
|
-
)),
|
|
664
|
-
( localizeWithPath(
|
|
665
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
666
|
-
'task.SaveBeforeRun.prompt',
|
|
667
|
-
'Prompts whether to save editors before running.'
|
|
668
|
-
)),
|
|
669
|
-
],
|
|
670
|
-
default: 'always',
|
|
671
|
-
},
|
|
672
|
-
["task.verboseLogging" ]: {
|
|
673
|
-
type: 'boolean',
|
|
674
|
-
description: ( localizeWithPath(
|
|
675
|
-
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
676
|
-
'task.verboseLogging',
|
|
677
|
-
"Enable verbose logging for tasks."
|
|
678
|
-
)),
|
|
679
|
-
default: false
|
|
680
|
-
},
|
|
681
|
-
}
|
|
682
|
-
});
|
|
683
|
-
|
|
684
|
-
export { TaskStatusBarContributions };
|