Skip to content

Commit ef7aa9f

Browse files
committed
Rename task presenation clearBeforeExecuting to clear
1 parent f8b4068 commit ef7aa9f

9 files changed

Lines changed: 17 additions & 17 deletions

File tree

src/vs/vscode.proposed.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1182,7 +1182,7 @@ declare module 'vscode' {
11821182
/**
11831183
* Controls whether the terminal is cleared before executing the task.
11841184
*/
1185-
clearBeforeExecuting?: boolean;
1185+
clear?: boolean;
11861186
}
11871187
//#endregion
11881188

src/vs/workbench/api/electron-browser/mainThreadTask.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ namespace TaskPresentationOptionsDTO {
9191
}
9292
export function to(value: TaskPresentationOptionsDTO): PresentationOptions {
9393
if (value === void 0 || value === null) {
94-
return { reveal: RevealKind.Always, echo: true, focus: false, panel: PanelKind.Shared, showReuseMessage: true, clearBeforeExecuting: false };
94+
return { reveal: RevealKind.Always, echo: true, focus: false, panel: PanelKind.Shared, showReuseMessage: true, clear: false };
9595
}
9696
return Objects.assign(Object.create(null), value);
9797
}

src/vs/workbench/api/node/extHostTask.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,15 +231,15 @@ namespace TaskPanelKind {
231231
namespace PresentationOptions {
232232
export function from(value: vscode.TaskPresentationOptions): tasks.PresentationOptions {
233233
if (value === void 0 || value === null) {
234-
return { reveal: tasks.RevealKind.Always, echo: true, focus: false, panel: tasks.PanelKind.Shared, showReuseMessage: true, clearBeforeExecuting: false };
234+
return { reveal: tasks.RevealKind.Always, echo: true, focus: false, panel: tasks.PanelKind.Shared, showReuseMessage: true, clear: false };
235235
}
236236
return {
237237
reveal: TaskRevealKind.from(value.reveal),
238238
echo: value.echo === void 0 ? true : !!value.echo,
239239
focus: !!value.focus,
240240
panel: TaskPanelKind.from(value.panel),
241241
showReuseMessage: value.showReuseMessage === void 0 ? true : !!value.showReuseMessage,
242-
clearBeforeExecuting: value.clearBeforeExecuting === void 0 ? false : !!value.clearBeforeExecuting,
242+
clear: value.clear === void 0 ? false : !!value.clear,
243243
};
244244
}
245245
}

src/vs/workbench/api/shared/tasks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export interface TaskPresentationOptionsDTO {
1616
focus?: boolean;
1717
panel?: number;
1818
showReuseMessage?: boolean;
19-
clearBeforeExecuting?: boolean;
19+
clear?: boolean;
2020
}
2121

2222
export interface ExecutionOptionsDTO {

src/vs/workbench/parts/tasks/common/tasks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ export interface PresentationOptions {
207207
/**
208208
* Controls whether to clear the terminal before executing the task.
209209
*/
210-
clearBeforeExecuting: boolean;
210+
clear: boolean;
211211
}
212212

213213
export enum RuntimeType {

src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ const presentation: IJSONSchema = {
8383
focus: false,
8484
panel: 'shared',
8585
showReuseMessage: true,
86-
clearBeforeExecuting: false,
86+
clear: false,
8787
},
8888
description: nls.localize('JsonSchema.tasks.presentation', 'Configures the panel that is used to present the task\'s ouput and reads its input.'),
8989
additionalProperties: false,
@@ -120,10 +120,10 @@ const presentation: IJSONSchema = {
120120
default: true,
121121
description: nls.localize('JsonSchema.tasks.presentation.showReuseMessage', 'Controls whether to show the `Terminal will be reused by tasks, press any key to close it` message.')
122122
},
123-
clearBeforeExecuting: {
123+
clear: {
124124
type: 'boolean',
125125
default: false,
126-
description: nls.localize('JsonSchema.tasks.presentation.clearBeforeExecuting', 'Controls whether the terminal is cleared before executing the task.')
126+
description: nls.localize('JsonSchema.tasks.presentation.clear', 'Controls whether the terminal is cleared before executing the task.')
127127
}
128128
}
129129
};

src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ export class TerminalTaskSystem implements ITaskSystem {
683683
}
684684
if (terminalToReuse) {
685685
terminalToReuse.terminal.reuseTerminal(shellLaunchConfig);
686-
if (task.command.presentation.clearBeforeExecuting) {
686+
if (task.command.presentation.clear) {
687687
terminalToReuse.terminal.clear();
688688
}
689689
return [terminalToReuse.terminal, commandExecutable, undefined];

src/vs/workbench/parts/tasks/node/taskConfiguration.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export interface PresentationOptions {
116116
/**
117117
* Controls whether the terminal should be cleared before running the task.
118118
*/
119-
clearBeforeExecuting?: boolean;
119+
clear?: boolean;
120120
}
121121

122122
export interface TaskIdentifier {
@@ -759,7 +759,7 @@ namespace CommandConfiguration {
759759
let focus: boolean;
760760
let panel: Tasks.PanelKind;
761761
let showReuseMessage: boolean;
762-
let clearBeforeExecuting: boolean;
762+
let clear: boolean;
763763
if (Types.isBoolean(config.echoCommand)) {
764764
echo = config.echoCommand;
765765
}
@@ -783,14 +783,14 @@ namespace CommandConfiguration {
783783
if (Types.isBoolean(presentation.showReuseMessage)) {
784784
showReuseMessage = presentation.showReuseMessage;
785785
}
786-
if (Types.isBoolean(presentation.clearBeforeExecuting)) {
787-
clearBeforeExecuting = presentation.clearBeforeExecuting;
786+
if (Types.isBoolean(presentation.clear)) {
787+
clear = presentation.clear;
788788
}
789789
}
790790
if (echo === void 0 && reveal === void 0 && focus === void 0 && panel === void 0 && showReuseMessage === void 0) {
791791
return undefined;
792792
}
793-
return { echo, reveal, focus, panel, showReuseMessage, clearBeforeExecuting };
793+
return { echo, reveal, focus, panel, showReuseMessage, clear };
794794
}
795795

796796
export function assignProperties(target: Tasks.PresentationOptions, source: Tasks.PresentationOptions): Tasks.PresentationOptions {
@@ -803,7 +803,7 @@ namespace CommandConfiguration {
803803

804804
export function fillDefaults(value: Tasks.PresentationOptions, context: ParseContext): Tasks.PresentationOptions {
805805
let defaultEcho = context.engine === Tasks.ExecutionEngine.Terminal ? true : false;
806-
return _fillDefaults(value, { echo: defaultEcho, reveal: Tasks.RevealKind.Always, focus: false, panel: Tasks.PanelKind.Shared, showReuseMessage: true, clearBeforeExecuting: false }, properties, context);
806+
return _fillDefaults(value, { echo: defaultEcho, reveal: Tasks.RevealKind.Always, focus: false, panel: Tasks.PanelKind.Shared, showReuseMessage: true, clear: false }, properties, context);
807807
}
808808

809809
export function freeze(value: Tasks.PresentationOptions): Readonly<Tasks.PresentationOptions> {

src/vs/workbench/parts/tasks/test/electron-browser/configuration.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class PresentationBuilder {
8383
public result: Tasks.PresentationOptions;
8484

8585
constructor(public parent: CommandConfigurationBuilder) {
86-
this.result = { echo: false, reveal: Tasks.RevealKind.Always, focus: false, panel: Tasks.PanelKind.Shared, showReuseMessage: true, clearBeforeExecuting: false };
86+
this.result = { echo: false, reveal: Tasks.RevealKind.Always, focus: false, panel: Tasks.PanelKind.Shared, showReuseMessage: true, clear: false };
8787
}
8888

8989
public echo(value: boolean): PresentationBuilder {

0 commit comments

Comments
 (0)