output: allow to dispose output channels

fixes #20703
This commit is contained in:
isidor
2017-02-16 11:13:55 +01:00
parent aae2fd86e9
commit 09bc8765f5
5 changed files with 36 additions and 3 deletions

View File

@@ -183,6 +183,7 @@ export abstract class MainThreadMessageServiceShape {
export abstract class MainThreadOutputServiceShape {
$append(channelId: string, label: string, value: string): TPromise<void> { throw ni(); }
$clear(channelId: string, label: string): TPromise<void> { throw ni(); }
$dispose(channelId: string, label: string): TPromise<void> { throw ni(); }
$reveal(channelId: string, label: string, preserveFocus: boolean): TPromise<void> { throw ni(); }
$close(channelId: string): TPromise<void> { throw ni(); }
}

View File

@@ -29,7 +29,7 @@ export class ExtHostOutputChannel implements vscode.OutputChannel {
dispose(): void {
if (!this._disposed) {
this._proxy.$clear(this._id, this._name).then(() => {
this._proxy.$dispose(this._id, this._name).then(() => {
this._disposed = true;
});
}

View File

@@ -58,4 +58,9 @@ export class MainThreadOutputService extends MainThreadOutputServiceShape {
return undefined;
}
public $dispose(channelId: string, label: string): TPromise<void> {
this._getChannel(channelId, label).dispose();
return undefined;
}
}