"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts" between
vscode-1.48.2.tar.gz and vscode-1.49.0.tar.gz

About: Visual Studio Code is a source code editor (available for Windows, macOS and Linux). It comes with built-in support for JavaScript, TypeScript and Node.js and has extensions for other languages (such as C++, C#, Java, Python, PHP, Go). Source code.

abstractTaskService.ts  (vscode-1.48.2):abstractTaskService.ts  (vscode-1.49.0)
skipping to change at line 1531 skipping to change at line 1531
if (runSource === TaskRunSource.User) { if (runSource === TaskRunSource.User) {
await this.setRecentlyUsedTask(executeResult.task); await this.setRecentlyUsedTask(executeResult.task);
} }
if (executeResult.kind === TaskExecuteKind.Active) { if (executeResult.kind === TaskExecuteKind.Active) {
let active = executeResult.active; let active = executeResult.active;
if (active && active.same) { if (active && active.same) {
if (this._taskSystem?.isTaskVisible(executeResult .task)) { if (this._taskSystem?.isTaskVisible(executeResult .task)) {
const message = nls.localize('TaskSystem. activeSame.noBackground', 'The task \'{0}\' is already active.', executeResult.t ask.getQualifiedLabel()); const message = nls.localize('TaskSystem. activeSame.noBackground', 'The task \'{0}\' is already active.', executeResult.t ask.getQualifiedLabel());
let lastInstance = this.getTaskSystem().g etLastInstance(executeResult.task) ?? executeResult.task; let lastInstance = this.getTaskSystem().g etLastInstance(executeResult.task) ?? executeResult.task;
this.notificationService.prompt(Severity. Info, message, this.notificationService.prompt(Severity. Warning, message,
[{ [{
label: nls.localize('term inateTask', "Terminate Task"), label: nls.localize('term inateTask', "Terminate Task"),
run: () => this.terminate (lastInstance) run: () => this.terminate (lastInstance)
}, },
{ {
label: nls.localize('rest artTask', "Restart Task"), label: nls.localize('rest artTask', "Restart Task"),
run: () => this.restart(l astInstance) run: () => this.restart(l astInstance)
}], }],
{ sticky: true } { sticky: true }
); );
skipping to change at line 2966 skipping to change at line 2966
const cancellationToken: CancellationToken = tokenSource.token; const cancellationToken: CancellationToken = tokenSource.token;
let entries = Promise.all(stats).then((stats) => { let entries = Promise.all(stats).then((stats) => {
return taskPromise.then((taskMap) => { return taskPromise.then((taskMap) => {
let entries: QuickPickInput<TaskQuickPickEntryTyp e>[] = []; let entries: QuickPickInput<TaskQuickPickEntryTyp e>[] = [];
let needsCreateOrOpen: boolean = true; let needsCreateOrOpen: boolean = true;
if (this.contextService.getWorkbenchState() !== W orkbenchState.EMPTY) { if (this.contextService.getWorkbenchState() !== W orkbenchState.EMPTY) {
let tasks = taskMap.all(); let tasks = taskMap.all();
if (tasks.length > 0) { if (tasks.length > 0) {
tasks = tasks.sort((a, b) => a._l abel.localeCompare(b._label)); tasks = tasks.sort((a, b) => a._l abel.localeCompare(b._label));
for (let task of tasks) { for (let task of tasks) {
entries.push({ label: tas k._label, task, description: this.getTaskDescription(task) }); entries.push({ label: tas k._label, task, description: this.getTaskDescription(task), detail: this.showDet ail() ? task.configurationProperties.detail : undefined });
if (!ContributedTask.is(t ask)) { if (!ContributedTask.is(t ask)) {
needsCreateOrOpen = false; needsCreateOrOpen = false;
} }
} }
} }
if (needsCreateOrOpen) { if (needsCreateOrOpen) {
let label = stats[0] !== undefine d ? openLabel : createLabel; let label = stats[0] !== undefine d ? openLabel : createLabel;
if (entries.length) { if (entries.length) {
entries.push({ type: 'sep arator' }); entries.push({ type: 'sep arator' });
} }
skipping to change at line 3062 skipping to change at line 3062
let selectedEntry: TaskQuickPickEntry; let selectedEntry: TaskQuickPickEntry;
for (let task of tasks) { for (let task of tasks) {
if (task.configurationProperties.group == = TaskGroup.Build && task.configurationProperties.groupType === GroupType.defaul t) { if (task.configurationProperties.group == = TaskGroup.Build && task.configurationProperties.groupType === GroupType.defaul t) {
selectedTask = task; selectedTask = task;
break; break;
} }
} }
if (selectedTask) { if (selectedTask) {
selectedEntry = { selectedEntry = {
label: nls.localize('TaskService. defaultBuildTaskExists', '{0} is already marked as the default build task', sele ctedTask.getQualifiedLabel()), label: nls.localize('TaskService. defaultBuildTaskExists', '{0} is already marked as the default build task', sele ctedTask.getQualifiedLabel()),
task: selectedTask task: selectedTask,
detail: this.showDetail() ? selec
tedTask.configurationProperties.detail : undefined
}; };
} }
this.showIgnoredFoldersMessage().then(() => { this.showIgnoredFoldersMessage().then(() => {
this.showQuickPick(tasks, this.showQuickPick(tasks,
nls.localize('TaskService.pickDef aultBuildTask', 'Select the task to be used as the default build task'), undefin ed, true, false, selectedEntry). nls.localize('TaskService.pickDef aultBuildTask', 'Select the task to be used as the default build task'), undefin ed, true, false, selectedEntry).
then((entry) => { then((entry) => {
let task: Task | undefine d | null = entry ? entry.task : undefined; let task: Task | undefine d | null = entry ? entry.task : undefined;
if ((task === undefined) || (task === null)) { if ((task === undefined) || (task === null)) {
return; return;
} }
skipping to change at line 3113 skipping to change at line 3114
for (let task of tasks) { for (let task of tasks) {
if (task.configurationProperties.group == = TaskGroup.Test && task.configurationProperties.groupType === GroupType.default ) { if (task.configurationProperties.group == = TaskGroup.Test && task.configurationProperties.groupType === GroupType.default ) {
selectedTask = task; selectedTask = task;
break; break;
} }
} }
if (selectedTask) { if (selectedTask) {
selectedEntry = { selectedEntry = {
label: nls.localize('TaskService. defaultTestTaskExists', '{0} is already marked as the default test task.', selec tedTask.getQualifiedLabel()), label: nls.localize('TaskService. defaultTestTaskExists', '{0} is already marked as the default test task.', selec tedTask.getQualifiedLabel()),
task: selectedTask task: selectedTask,
detail: this.showDetail() ? selec
tedTask.configurationProperties.detail : undefined
}; };
} }
this.showIgnoredFoldersMessage().then(() => { this.showIgnoredFoldersMessage().then(() => {
this.showQuickPick(tasks, this.showQuickPick(tasks,
nls.localize('TaskService.pickDef aultTestTask', 'Select the task to be used as the default test task'), undefined , true, false, selectedEntry).then((entry) => { nls.localize('TaskService.pickDef aultTestTask', 'Select the task to be used as the default test task'), undefined , true, false, selectedEntry).then((entry) => {
let task: Task | undefine d | null = entry ? entry.task : undefined; let task: Task | undefine d | null = entry ? entry.task : undefined;
if (!task) { if (!task) {
return; return;
} }
 End of changes. 4 change blocks. 
4 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)