Skip to content

Commit 346a698

Browse files
committed
output: move clearOutput to IOutputChannel
1 parent 85294e4 commit 346a698

5 files changed

Lines changed: 10 additions & 13 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export class MainThreadOutputService {
9393
}
9494

9595
public clear(channel: string): TPromise<void> {
96-
this._outputService.clearOutput(channel);
96+
this._outputService.getOutputChannel(channel).clear();
9797
return undefined;
9898
}
9999

src/vs/workbench/parts/output/browser/outputActions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export class ClearOutputAction extends Action {
5353
}
5454

5555
public run(): TPromise<any> {
56-
this.outputService.clearOutput(this.outputService.getActiveChannel());
56+
this.outputService.getOutputChannel(this.outputService.getActiveChannel()).clear();
5757
this.panelService.getActivePanel().focus();
5858

5959
return TPromise.as(true);
@@ -84,7 +84,7 @@ export class ClearOutputEditorAction extends EditorAction {
8484
}
8585

8686
public run(): TPromise<boolean> {
87-
this.outputService.clearOutput(this.outputService.getActiveChannel());
87+
this.outputService.getOutputChannel(this.outputService.getActiveChannel()).clear();
8888
return TPromise.as(false);
8989
}
9090
}

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

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,6 @@ export interface IOutputService {
7474
*/
7575
getActiveChannel(): string;
7676

77-
/**
78-
* Clears all received output.
79-
*
80-
* The optional channel allows to clear the output for a specific channel. If you leave the
81-
* channel out, you get clear the default channels output.
82-
*/
83-
clearOutput(channel: string): void;
84-
8577
/**
8678
* Opens the output for the given channel
8779
*
@@ -113,6 +105,11 @@ export interface IOutputChannel {
113105
*/
114106
append(output: string): void;
115107

108+
109+
/**
110+
* Clears all received output.
111+
*/
112+
clear(): void;
116113
}
117114

118115
export interface IOutputChannelRegistry {

src/vs/workbench/parts/output/common/outputServices.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export class OutputService implements IOutputService {
9999
return this.activeChannelId;
100100
}
101101

102-
public clearOutput(channel: string): void {
102+
private clearOutput(channel: string): void {
103103
this.receivedOutput[channel] = '';
104104

105105
this._onOutput.fire({ channelId: channel, output: null /* indicator to clear output */ });

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,6 @@ export class ProcessRunnerSystem extends EventEmitter implements ITaskSystem {
410410
}
411411

412412
private clearOutput(): void {
413-
this.outputService.clearOutput(this.outputChannelId);
413+
this.outputService.getOutputChannel(this.outputChannelId).clear();
414414
}
415415
}

0 commit comments

Comments
 (0)