@codingame/monaco-vscode-task-service-override 2.2.2 → 3.0.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/vscode/src/vs/workbench/contrib/tasks/browser/abstractTaskService.js +9 -6
- package/vscode/src/vs/workbench/contrib/tasks/browser/runAutomaticTasks.js +22 -4
- package/vscode/src/vs/workbench/contrib/tasks/browser/task.contribution.js +42 -52
- package/vscode/src/vs/workbench/contrib/tasks/browser/taskTerminalStatus.js +8 -8
- package/vscode/src/vs/workbench/contrib/tasks/common/problemMatcher.js +4 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-task-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
"module": "index.js",
|
|
19
19
|
"types": "index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
21
|
+
"vscode": "npm:@codingame/monaco-vscode-api@3.0.0"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -13,7 +13,7 @@ import Severity from 'vscode/vscode/vs/base/common/severity';
|
|
|
13
13
|
import { isString, isBoolean, isStringArray } from 'vscode/vscode/vs/base/common/types';
|
|
14
14
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
15
15
|
import { generateUuid } from 'vscode/vscode/vs/base/common/uuid';
|
|
16
|
-
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
16
|
+
import { localize2WithPath, localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
17
17
|
import { CommandsRegistry, ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands';
|
|
18
18
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
|
|
19
19
|
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files';
|
|
@@ -75,7 +75,7 @@ const USE_SLOW_PICKER = 'task.quickOpen.showAll';
|
|
|
75
75
|
var ConfigureTaskAction;
|
|
76
76
|
( (function(ConfigureTaskAction) {
|
|
77
77
|
ConfigureTaskAction.ID = 'workbench.action.tasks.configureTaskRunner';
|
|
78
|
-
ConfigureTaskAction.TEXT = (
|
|
78
|
+
ConfigureTaskAction.TEXT = ( localize2WithPath(
|
|
79
79
|
'vs/workbench/contrib/tasks/browser/abstractTaskService',
|
|
80
80
|
'ConfigureTaskRunnerAction.label',
|
|
81
81
|
"Configure Task"
|
|
@@ -204,6 +204,8 @@ let AbstractTaskService = class AbstractTaskService extends Disposable {
|
|
|
204
204
|
this.onDidChangeTaskSystemInfo = this._onDidChangeTaskSystemInfo.event;
|
|
205
205
|
this._onDidReconnectToTasks = ( new Emitter());
|
|
206
206
|
this.onDidReconnectToTasks = this._onDidReconnectToTasks.event;
|
|
207
|
+
this._onDidChangeTaskConfig = ( new Emitter());
|
|
208
|
+
this.onDidChangeTaskConfig = this._onDidChangeTaskConfig.event;
|
|
207
209
|
this._whenTaskSystemReady = Event.toPromise(this.onDidChangeTaskSystemInfo);
|
|
208
210
|
this._workspaceTasksPromise = undefined;
|
|
209
211
|
this._taskSystem = undefined;
|
|
@@ -221,7 +223,7 @@ let AbstractTaskService = class AbstractTaskService extends Disposable {
|
|
|
221
223
|
this._updateSetup(folderSetup);
|
|
222
224
|
return this._updateWorkspaceTasks(2 );
|
|
223
225
|
}));
|
|
224
|
-
this._register(this._configurationService.onDidChangeConfiguration((e) => {
|
|
226
|
+
this._register(this._configurationService.onDidChangeConfiguration(async (e) => {
|
|
225
227
|
if (!e.affectsConfiguration('tasks') || (!this._taskSystem && !this._workspaceTasksPromise)) {
|
|
226
228
|
return;
|
|
227
229
|
}
|
|
@@ -235,7 +237,8 @@ let AbstractTaskService = class AbstractTaskService extends Disposable {
|
|
|
235
237
|
}
|
|
236
238
|
}
|
|
237
239
|
this._setTaskLRUCacheLimit();
|
|
238
|
-
|
|
240
|
+
await this._updateWorkspaceTasks(3 );
|
|
241
|
+
this._onDidChangeTaskConfig.fire();
|
|
239
242
|
}));
|
|
240
243
|
this._taskRunningState = TASK_RUNNING_STATE.bindTo(_contextKeyService);
|
|
241
244
|
this._onDidStateChange = this._register(( new Emitter()));
|
|
@@ -2570,7 +2573,7 @@ let AbstractTaskService = class AbstractTaskService extends Disposable {
|
|
|
2570
2573
|
const thisCapture = this;
|
|
2571
2574
|
return new (class extends Action {
|
|
2572
2575
|
constructor() {
|
|
2573
|
-
super(ConfigureTaskAction.ID, ConfigureTaskAction.TEXT, undefined, true, () => { thisCapture._runConfigureTasks(); return Promise.resolve(undefined); });
|
|
2576
|
+
super(ConfigureTaskAction.ID, ConfigureTaskAction.TEXT.value, undefined, true, () => { thisCapture._runConfigureTasks(); return Promise.resolve(undefined); });
|
|
2574
2577
|
}
|
|
2575
2578
|
});
|
|
2576
2579
|
}
|
|
@@ -2582,7 +2585,7 @@ let AbstractTaskService = class AbstractTaskService extends Disposable {
|
|
|
2582
2585
|
const needsTerminate = buildError.code === 1 ;
|
|
2583
2586
|
if (needsConfig || needsTerminate) {
|
|
2584
2587
|
this._notificationService.prompt(buildError.severity, buildError.message, [{
|
|
2585
|
-
label: needsConfig ? ConfigureTaskAction.TEXT : ( localizeWithPath(
|
|
2588
|
+
label: needsConfig ? ConfigureTaskAction.TEXT.value : ( localizeWithPath(
|
|
2586
2589
|
'vs/workbench/contrib/tasks/browser/abstractTaskService',
|
|
2587
2590
|
'TerminateAction.label',
|
|
2588
2591
|
"Terminate Task"
|
|
@@ -41,9 +41,28 @@ let RunAutomaticTasks = class RunAutomaticTasks extends Disposable {
|
|
|
41
41
|
this._logService.trace('RunAutomaticTasks: Awaiting task system info.');
|
|
42
42
|
await Event.toPromise(Event.once(this._taskService.onDidChangeTaskSystemInfo));
|
|
43
43
|
}
|
|
44
|
-
|
|
44
|
+
let workspaceTasks = await this._taskService.getWorkspaceTasks(2 );
|
|
45
45
|
this._logService.trace(`RunAutomaticTasks: Found ${workspaceTasks.size} automatic tasks`);
|
|
46
|
-
|
|
46
|
+
let autoTasks = this._findAutoTasks(this._taskService, workspaceTasks);
|
|
47
|
+
this._logService.trace(`RunAutomaticTasks: taskNames=${JSON.stringify(autoTasks.taskNames)}`);
|
|
48
|
+
if (autoTasks.taskNames.length === 0) {
|
|
49
|
+
const updatedWithinTimeout = await Promise.race([
|
|
50
|
+
( new Promise((resolve) => {
|
|
51
|
+
Event.toPromise(Event.once(this._taskService.onDidChangeTaskConfig)).then(() => resolve(true));
|
|
52
|
+
})),
|
|
53
|
+
( new Promise((resolve) => {
|
|
54
|
+
const timer = setTimeout(() => { clearTimeout(timer); resolve(false); }, 10000);
|
|
55
|
+
}))
|
|
56
|
+
]);
|
|
57
|
+
if (!updatedWithinTimeout) {
|
|
58
|
+
this._logService.trace(`RunAutomaticTasks: waited some extra time, but no update of tasks configuration`);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
workspaceTasks = await this._taskService.getWorkspaceTasks(2 );
|
|
62
|
+
autoTasks = this._findAutoTasks(this._taskService, workspaceTasks);
|
|
63
|
+
this._logService.trace(`RunAutomaticTasks: updated taskNames=${JSON.stringify(autoTasks.taskNames)}`);
|
|
64
|
+
}
|
|
65
|
+
this._runWithPermission(this._taskService, this._configurationService, autoTasks.tasks, autoTasks.taskNames);
|
|
47
66
|
}
|
|
48
67
|
_runTasks(taskService, tasks) {
|
|
49
68
|
tasks.forEach(task => {
|
|
@@ -112,8 +131,7 @@ let RunAutomaticTasks = class RunAutomaticTasks extends Disposable {
|
|
|
112
131
|
}
|
|
113
132
|
return { tasks, taskNames, locations };
|
|
114
133
|
}
|
|
115
|
-
async _runWithPermission(taskService, configurationService,
|
|
116
|
-
const { tasks, taskNames } = this._findAutoTasks(taskService, workspaceTaskResult);
|
|
134
|
+
async _runWithPermission(taskService, configurationService, tasks, taskNames) {
|
|
117
135
|
if (taskNames.length === 0) {
|
|
118
136
|
return;
|
|
119
137
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
2
|
+
import { localizeWithPath, localize2WithPath } from 'vscode/vscode/vs/nls';
|
|
3
3
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
4
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
5
5
|
import { registerAction2, MenuRegistry, MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
@@ -24,6 +24,7 @@ import { TasksQuickAccessProvider } from './tasksQuickAccess.js';
|
|
|
24
24
|
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
25
25
|
import { TaskDefinitionRegistry } from 'vscode/vscode/vs/workbench/contrib/tasks/common/taskDefinitionRegistry';
|
|
26
26
|
import { isString } from 'vscode/vscode/vs/base/common/types';
|
|
27
|
+
import { promiseWithResolvers } from 'vscode/vscode/vs/base/common/async';
|
|
27
28
|
|
|
28
29
|
const workbenchRegistry = ( Registry.as(Extensions.Workbench));
|
|
29
30
|
workbenchRegistry.registerWorkbenchContribution(RunAutomaticTasks, 4 );
|
|
@@ -47,7 +48,7 @@ let TaskStatusBarContributions = class TaskStatusBarContributions extends Dispos
|
|
|
47
48
|
}
|
|
48
49
|
_registerListeners() {
|
|
49
50
|
let promise = undefined;
|
|
50
|
-
let
|
|
51
|
+
let resolve;
|
|
51
52
|
this._taskService.onDidStateChange(event => {
|
|
52
53
|
if (event.kind === "changed" ) {
|
|
53
54
|
this._updateRunningTasksStatus();
|
|
@@ -58,9 +59,7 @@ let TaskStatusBarContributions = class TaskStatusBarContributions extends Dispos
|
|
|
58
59
|
this._activeTasksCount++;
|
|
59
60
|
if (this._activeTasksCount === 1) {
|
|
60
61
|
if (!promise) {
|
|
61
|
-
promise
|
|
62
|
-
resolver = resolve;
|
|
63
|
-
}));
|
|
62
|
+
({ promise, resolve } = promiseWithResolvers());
|
|
64
63
|
}
|
|
65
64
|
}
|
|
66
65
|
break;
|
|
@@ -68,8 +67,8 @@ let TaskStatusBarContributions = class TaskStatusBarContributions extends Dispos
|
|
|
68
67
|
if (this._activeTasksCount > 0) {
|
|
69
68
|
this._activeTasksCount--;
|
|
70
69
|
if (this._activeTasksCount === 0) {
|
|
71
|
-
if (promise &&
|
|
72
|
-
|
|
70
|
+
if (promise && resolve) {
|
|
71
|
+
resolve();
|
|
73
72
|
}
|
|
74
73
|
}
|
|
75
74
|
}
|
|
@@ -77,8 +76,8 @@ let TaskStatusBarContributions = class TaskStatusBarContributions extends Dispos
|
|
|
77
76
|
case "terminated" :
|
|
78
77
|
if (this._activeTasksCount !== 0) {
|
|
79
78
|
this._activeTasksCount = 0;
|
|
80
|
-
if (promise &&
|
|
81
|
-
|
|
79
|
+
if (promise && resolve) {
|
|
80
|
+
resolve();
|
|
82
81
|
}
|
|
83
82
|
}
|
|
84
83
|
break;
|
|
@@ -248,11 +247,11 @@ MenuRegistry.appendMenuItem(MenuId.MenubarTerminalMenu, {
|
|
|
248
247
|
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
249
248
|
command: {
|
|
250
249
|
id: 'workbench.action.tasks.openWorkspaceFileTasks',
|
|
251
|
-
title:
|
|
250
|
+
title: ( localize2WithPath(
|
|
252
251
|
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
253
252
|
'workbench.action.tasks.openWorkspaceFileTasks',
|
|
254
253
|
"Open Workspace Tasks"
|
|
255
|
-
)),
|
|
254
|
+
)),
|
|
256
255
|
category: TASKS_CATEGORY
|
|
257
256
|
},
|
|
258
257
|
when: ( ContextKeyExpr.and(( WorkbenchStateContext.isEqualTo('workspace')), TaskExecutionSupportedContext))
|
|
@@ -260,7 +259,7 @@ MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
|
260
259
|
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
261
260
|
command: {
|
|
262
261
|
id: ConfigureTaskAction.ID,
|
|
263
|
-
title:
|
|
262
|
+
title: ConfigureTaskAction.TEXT,
|
|
264
263
|
category: TASKS_CATEGORY
|
|
265
264
|
},
|
|
266
265
|
when: TaskExecutionSupportedContext
|
|
@@ -268,11 +267,11 @@ MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
|
268
267
|
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
269
268
|
command: {
|
|
270
269
|
id: 'workbench.action.tasks.showLog',
|
|
271
|
-
title:
|
|
270
|
+
title: ( localize2WithPath(
|
|
272
271
|
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
273
272
|
'ShowLogAction.label',
|
|
274
273
|
"Show Task Log"
|
|
275
|
-
)),
|
|
274
|
+
)),
|
|
276
275
|
category: TASKS_CATEGORY
|
|
277
276
|
},
|
|
278
277
|
when: TaskExecutionSupportedContext
|
|
@@ -280,22 +279,22 @@ MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
|
280
279
|
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
281
280
|
command: {
|
|
282
281
|
id: 'workbench.action.tasks.runTask',
|
|
283
|
-
title:
|
|
282
|
+
title: ( localize2WithPath(
|
|
284
283
|
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
285
284
|
'RunTaskAction.label',
|
|
286
285
|
"Run Task"
|
|
287
|
-
)),
|
|
286
|
+
)),
|
|
288
287
|
category: TASKS_CATEGORY
|
|
289
288
|
}
|
|
290
289
|
});
|
|
291
290
|
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
292
291
|
command: {
|
|
293
292
|
id: 'workbench.action.tasks.reRunTask',
|
|
294
|
-
title:
|
|
293
|
+
title: ( localize2WithPath(
|
|
295
294
|
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
296
295
|
'ReRunTaskAction.label',
|
|
297
296
|
"Rerun Last Task"
|
|
298
|
-
)),
|
|
297
|
+
)),
|
|
299
298
|
category: TASKS_CATEGORY
|
|
300
299
|
},
|
|
301
300
|
when: TaskExecutionSupportedContext
|
|
@@ -303,11 +302,11 @@ MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
|
303
302
|
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
304
303
|
command: {
|
|
305
304
|
id: 'workbench.action.tasks.restartTask',
|
|
306
|
-
title:
|
|
305
|
+
title: ( localize2WithPath(
|
|
307
306
|
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
308
307
|
'RestartTaskAction.label',
|
|
309
308
|
"Restart Running Task"
|
|
310
|
-
)),
|
|
309
|
+
)),
|
|
311
310
|
category: TASKS_CATEGORY
|
|
312
311
|
},
|
|
313
312
|
when: TaskExecutionSupportedContext
|
|
@@ -315,11 +314,11 @@ MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
|
315
314
|
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
316
315
|
command: {
|
|
317
316
|
id: 'workbench.action.tasks.showTasks',
|
|
318
|
-
title:
|
|
317
|
+
title: ( localize2WithPath(
|
|
319
318
|
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
320
319
|
'ShowTasksAction.label',
|
|
321
320
|
"Show Running Tasks"
|
|
322
|
-
)),
|
|
321
|
+
)),
|
|
323
322
|
category: TASKS_CATEGORY
|
|
324
323
|
},
|
|
325
324
|
when: TaskExecutionSupportedContext
|
|
@@ -327,11 +326,11 @@ MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
|
327
326
|
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
328
327
|
command: {
|
|
329
328
|
id: 'workbench.action.tasks.terminate',
|
|
330
|
-
title:
|
|
329
|
+
title: ( localize2WithPath(
|
|
331
330
|
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
332
331
|
'TerminateAction.label',
|
|
333
332
|
"Terminate Task"
|
|
334
|
-
)),
|
|
333
|
+
)),
|
|
335
334
|
category: TASKS_CATEGORY
|
|
336
335
|
},
|
|
337
336
|
when: TaskExecutionSupportedContext
|
|
@@ -339,11 +338,11 @@ MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
|
339
338
|
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
340
339
|
command: {
|
|
341
340
|
id: 'workbench.action.tasks.build',
|
|
342
|
-
title:
|
|
341
|
+
title: ( localize2WithPath(
|
|
343
342
|
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
344
343
|
'BuildAction.label',
|
|
345
344
|
"Run Build Task"
|
|
346
|
-
)),
|
|
345
|
+
)),
|
|
347
346
|
category: TASKS_CATEGORY
|
|
348
347
|
},
|
|
349
348
|
when: TaskExecutionSupportedContext
|
|
@@ -351,11 +350,11 @@ MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
|
351
350
|
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
352
351
|
command: {
|
|
353
352
|
id: 'workbench.action.tasks.test',
|
|
354
|
-
title:
|
|
353
|
+
title: ( localize2WithPath(
|
|
355
354
|
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
356
355
|
'TestAction.label',
|
|
357
356
|
"Run Test Task"
|
|
358
|
-
)),
|
|
357
|
+
)),
|
|
359
358
|
category: TASKS_CATEGORY
|
|
360
359
|
},
|
|
361
360
|
when: TaskExecutionSupportedContext
|
|
@@ -363,14 +362,11 @@ MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
|
363
362
|
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
364
363
|
command: {
|
|
365
364
|
id: 'workbench.action.tasks.configureDefaultBuildTask',
|
|
366
|
-
title:
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
)),
|
|
372
|
-
original: 'Configure Default Build Task'
|
|
373
|
-
},
|
|
365
|
+
title: ( localize2WithPath(
|
|
366
|
+
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
367
|
+
'ConfigureDefaultBuildTask.label',
|
|
368
|
+
"Configure Default Build Task"
|
|
369
|
+
)),
|
|
374
370
|
category: TASKS_CATEGORY
|
|
375
371
|
},
|
|
376
372
|
when: TaskExecutionSupportedContext
|
|
@@ -378,14 +374,11 @@ MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
|
378
374
|
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
379
375
|
command: {
|
|
380
376
|
id: 'workbench.action.tasks.configureDefaultTestTask',
|
|
381
|
-
title:
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
)),
|
|
387
|
-
original: 'Configure Default Test Task'
|
|
388
|
-
},
|
|
377
|
+
title: ( localize2WithPath(
|
|
378
|
+
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
379
|
+
'ConfigureDefaultTestTask.label',
|
|
380
|
+
"Configure Default Test Task"
|
|
381
|
+
)),
|
|
389
382
|
category: TASKS_CATEGORY
|
|
390
383
|
},
|
|
391
384
|
when: TaskExecutionSupportedContext
|
|
@@ -393,14 +386,11 @@ MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
|
393
386
|
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
394
387
|
command: {
|
|
395
388
|
id: 'workbench.action.tasks.openUserTasks',
|
|
396
|
-
title:
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
)),
|
|
402
|
-
original: 'Open User Tasks'
|
|
403
|
-
}, category: TASKS_CATEGORY
|
|
389
|
+
title: ( localize2WithPath(
|
|
390
|
+
'vs/workbench/contrib/tasks/browser/task.contribution',
|
|
391
|
+
'workbench.action.tasks.openUserTasks',
|
|
392
|
+
"Open User Tasks"
|
|
393
|
+
)), category: TASKS_CATEGORY
|
|
404
394
|
},
|
|
405
395
|
when: TaskExecutionSupportedContext
|
|
406
396
|
});
|
|
@@ -7,7 +7,7 @@ import { StartStopProblemCollector } from '../common/problemCollectors.js';
|
|
|
7
7
|
import { ITaskService } from 'vscode/vscode/vs/workbench/contrib/tasks/common/taskService';
|
|
8
8
|
import { MarkerSeverity } from 'vscode/vscode/vs/platform/markers/common/markers';
|
|
9
9
|
import { spinningLoading } from 'vscode/vscode/vs/platform/theme/common/iconRegistry';
|
|
10
|
-
import {
|
|
10
|
+
import { AccessibilitySignal, IAccessibilitySignalService } from 'vscode/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService';
|
|
11
11
|
|
|
12
12
|
const TASK_TERMINAL_STATUS_ID = 'task_terminal_status';
|
|
13
13
|
const ACTIVE_TASK_STATUS = { id: TASK_TERMINAL_STATUS_ID, icon: spinningLoading, severity: Severity.Info, tooltip: ( localizeWithPath(
|
|
@@ -56,9 +56,9 @@ const INFO_INACTIVE_TASK_STATUS = { id: TASK_TERMINAL_STATUS_ID, icon: Codicon.i
|
|
|
56
56
|
"Task has infos and is waiting..."
|
|
57
57
|
)) };
|
|
58
58
|
let TaskTerminalStatus = class TaskTerminalStatus extends Disposable {
|
|
59
|
-
constructor(taskService,
|
|
59
|
+
constructor(taskService, _accessibilitySignalService) {
|
|
60
60
|
super();
|
|
61
|
-
this.
|
|
61
|
+
this._accessibilitySignalService = _accessibilitySignalService;
|
|
62
62
|
this.terminalMap = ( new Map());
|
|
63
63
|
this._register(taskService.onDidStateChange((event) => {
|
|
64
64
|
switch (event.kind) {
|
|
@@ -119,7 +119,7 @@ let TaskTerminalStatus = class TaskTerminalStatus extends Disposable {
|
|
|
119
119
|
terminalData.taskRunEnded = true;
|
|
120
120
|
terminalData.terminal.statusList.remove(terminalData.status);
|
|
121
121
|
if ((event.exitCode === 0) && (terminalData.problemMatcher.numberOfMatches === 0)) {
|
|
122
|
-
this.
|
|
122
|
+
this._accessibilitySignalService.playSignal(AccessibilitySignal.taskCompleted);
|
|
123
123
|
if (terminalData.task.configurationProperties.isBackground) {
|
|
124
124
|
for (const status of terminalData.terminal.statusList.statuses) {
|
|
125
125
|
terminalData.terminal.statusList.remove(status);
|
|
@@ -130,7 +130,7 @@ let TaskTerminalStatus = class TaskTerminalStatus extends Disposable {
|
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
else if (event.exitCode || terminalData.problemMatcher.maxMarkerSeverity === MarkerSeverity.Error) {
|
|
133
|
-
this.
|
|
133
|
+
this._accessibilitySignalService.playSignal(AccessibilitySignal.taskFailed);
|
|
134
134
|
terminalData.terminal.statusList.add(FAILED_TASK_STATUS);
|
|
135
135
|
}
|
|
136
136
|
else if (terminalData.problemMatcher.maxMarkerSeverity === MarkerSeverity.Warning) {
|
|
@@ -147,11 +147,11 @@ let TaskTerminalStatus = class TaskTerminalStatus extends Disposable {
|
|
|
147
147
|
}
|
|
148
148
|
terminalData.terminal.statusList.remove(terminalData.status);
|
|
149
149
|
if (terminalData.problemMatcher.numberOfMatches === 0) {
|
|
150
|
-
this.
|
|
150
|
+
this._accessibilitySignalService.playSignal(AccessibilitySignal.taskCompleted);
|
|
151
151
|
terminalData.terminal.statusList.add(SUCCEEDED_INACTIVE_TASK_STATUS);
|
|
152
152
|
}
|
|
153
153
|
else if (terminalData.problemMatcher.maxMarkerSeverity === MarkerSeverity.Error) {
|
|
154
|
-
this.
|
|
154
|
+
this._accessibilitySignalService.playSignal(AccessibilitySignal.taskFailed);
|
|
155
155
|
terminalData.terminal.statusList.add(FAILED_INACTIVE_TASK_STATUS);
|
|
156
156
|
}
|
|
157
157
|
else if (terminalData.problemMatcher.maxMarkerSeverity === MarkerSeverity.Warning) {
|
|
@@ -185,7 +185,7 @@ let TaskTerminalStatus = class TaskTerminalStatus extends Disposable {
|
|
|
185
185
|
};
|
|
186
186
|
TaskTerminalStatus = ( __decorate([
|
|
187
187
|
( __param(0, ITaskService)),
|
|
188
|
-
( __param(1,
|
|
188
|
+
( __param(1, IAccessibilitySignalService))
|
|
189
189
|
], TaskTerminalStatus));
|
|
190
190
|
|
|
191
191
|
export { ACTIVE_TASK_STATUS, FAILED_TASK_STATUS, SUCCEEDED_TASK_STATUS, TaskTerminalStatus };
|
|
@@ -839,7 +839,7 @@ var Schemas;
|
|
|
839
839
|
}
|
|
840
840
|
};
|
|
841
841
|
})(Schemas || (Schemas = {})));
|
|
842
|
-
const problemPatternExtPoint =
|
|
842
|
+
const problemPatternExtPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
843
843
|
extensionPoint: 'problemPatterns',
|
|
844
844
|
jsonSchema: {
|
|
845
845
|
description: ( localizeWithPath(
|
|
@@ -855,7 +855,7 @@ const problemPatternExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
|
855
855
|
]
|
|
856
856
|
}
|
|
857
857
|
}
|
|
858
|
-
})
|
|
858
|
+
});
|
|
859
859
|
class ProblemPatternRegistryImpl {
|
|
860
860
|
constructor() {
|
|
861
861
|
this.patterns = Object.create(null);
|
|
@@ -1616,7 +1616,7 @@ class ProblemMatcherParser extends Parser {
|
|
|
1616
1616
|
))
|
|
1617
1617
|
};
|
|
1618
1618
|
})(Schemas || (Schemas = {})));
|
|
1619
|
-
const problemMatchersExtPoint =
|
|
1619
|
+
const problemMatchersExtPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
1620
1620
|
extensionPoint: 'problemMatchers',
|
|
1621
1621
|
deps: [problemPatternExtPoint],
|
|
1622
1622
|
jsonSchema: {
|
|
@@ -1628,7 +1628,7 @@ const problemMatchersExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
|
1628
1628
|
type: 'array',
|
|
1629
1629
|
items: Schemas.NamedProblemMatcher
|
|
1630
1630
|
}
|
|
1631
|
-
})
|
|
1631
|
+
});
|
|
1632
1632
|
class ProblemMatcherRegistryImpl {
|
|
1633
1633
|
constructor() {
|
|
1634
1634
|
this._onMatchersChanged = ( new Emitter());
|