mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-09 17:52:34 -05:00
Port VS Code 1.56.0 Hotfixes (#15912)
* fix #123040 * Switch priority of shell/shellArgs and defaultProfile setting Fixes #123159 We were too aggressive introducing the new default profile system as many users (as well as dev containers, microsoft/vscode-dev-containers#838) depend on these settings for their workflow. This also includes a change in behavior where if shellArgs are specified, they are applied to the fallback shell (even when shell.platform isn't specified), which aligns with past behavior. * fixes #123036 (#123263) * fixes #123041 (#123287) * 1.56 fix for #123044 * Do not invoke `resolveWithInteraction` over terminal settings (#123590) * Change grunt, gulp and jake task auto detection to be off by default (#123588) Co-authored-by: meganrogge <megrogge@gmail.com> Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Co-authored-by: João Moreno <joao.moreno@microsoft.com> Co-authored-by: Martin Aeschlimann <martinae@microsoft.com> Co-authored-by: Alex Dima <alexdima@microsoft.com>
This commit is contained in:
@@ -98,7 +98,7 @@ export namespace ConfigureTaskAction {
|
||||
export const TEXT = nls.localize('ConfigureTaskRunnerAction.label', "Configure Task");
|
||||
}
|
||||
|
||||
type TaskQuickPickEntryType = (IQuickPickItem & { task: Task; }) | (IQuickPickItem & { folder: IWorkspaceFolder; });
|
||||
type TaskQuickPickEntryType = (IQuickPickItem & { task: Task; }) | (IQuickPickItem & { folder: IWorkspaceFolder; }) | (IQuickPickItem & { settingType: string; });
|
||||
|
||||
class ProblemReporter implements TaskConfig.IProblemReporter {
|
||||
|
||||
@@ -2360,7 +2360,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
|
||||
}
|
||||
|
||||
private async showTwoLevelQuickPick(placeHolder: string, defaultEntry?: TaskQuickPickEntry) {
|
||||
return TaskQuickPick.show(this, this.configurationService, this.quickInputService, this.notificationService, placeHolder, defaultEntry);
|
||||
return TaskQuickPick.show(this, this.configurationService, this.quickInputService, this.notificationService, this.dialogService, placeHolder, defaultEntry);
|
||||
}
|
||||
|
||||
private async showQuickPick(tasks: Promise<Task[]> | Task[], placeHolder: string, defaultEntry?: TaskQuickPickEntry, group: boolean = false, sort: boolean = false, selectedEntry?: TaskQuickPickEntry, additionalEntries?: TaskQuickPickEntry[]): Promise<TaskQuickPickEntry | undefined | null> {
|
||||
@@ -2956,6 +2956,11 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
|
||||
return candidate && !!candidate.task;
|
||||
}
|
||||
|
||||
private isSettingEntry(value: IQuickPickItem): value is IQuickPickItem & { settingType: string } {
|
||||
let candidate: IQuickPickItem & { settingType: string } = value as any;
|
||||
return candidate && !!candidate.settingType;
|
||||
}
|
||||
|
||||
private configureTask(task: Task) {
|
||||
if (ContributedTask.is(task)) {
|
||||
this.customize(task, undefined, true);
|
||||
@@ -2972,6 +2977,9 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
|
||||
}
|
||||
if (this.isTaskEntry(selection)) {
|
||||
this.configureTask(selection.task);
|
||||
} else if (this.isSettingEntry(selection)) {
|
||||
const taskQuickPick = new TaskQuickPick(this, this.configurationService, this.quickInputService, this.notificationService, this.dialogService);
|
||||
taskQuickPick.handleSettingOption(selection.settingType);
|
||||
} else if (selection.folder && (this.contextService.getWorkbenchState() !== WorkbenchState.EMPTY)) {
|
||||
this.openTaskFile(selection.folder.toResource('.vscode/tasks.json'), TaskSourceKind.Workspace);
|
||||
} else {
|
||||
@@ -3066,7 +3074,12 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
|
||||
}
|
||||
}
|
||||
|
||||
this.quickInputService.pick(entries,
|
||||
const entriesWithSettings = entries.then(resolvedEntries => {
|
||||
resolvedEntries.push(...TaskQuickPick.allSettingEntries(this.configurationService));
|
||||
return resolvedEntries;
|
||||
});
|
||||
|
||||
this.quickInputService.pick(entriesWithSettings,
|
||||
{ placeHolder: nls.localize('TaskService.pickTask', 'Select a task to configure') }, cancellationToken).
|
||||
then(async (selection) => {
|
||||
if (cancellationToken.isCancellationRequested) {
|
||||
|
||||
Reference in New Issue
Block a user