mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 10:08:49 +01:00
Fix #42582
This commit is contained in:
@@ -35,18 +35,22 @@ export class ExtHostOutputChannel implements vscode.OutputChannel {
|
||||
}
|
||||
|
||||
append(value: string): void {
|
||||
this.validate();
|
||||
this._proxy.$append(this._id, this._name, value);
|
||||
}
|
||||
|
||||
appendLine(value: string): void {
|
||||
this.validate();
|
||||
this.append(value + '\n');
|
||||
}
|
||||
|
||||
clear(): void {
|
||||
this.validate();
|
||||
this._proxy.$clear(this._id, this._name);
|
||||
}
|
||||
|
||||
show(columnOrPreserveFocus?: vscode.ViewColumn | boolean, preserveFocus?: boolean): void {
|
||||
this.validate();
|
||||
if (typeof columnOrPreserveFocus === 'boolean') {
|
||||
preserveFocus = columnOrPreserveFocus;
|
||||
}
|
||||
@@ -55,8 +59,15 @@ export class ExtHostOutputChannel implements vscode.OutputChannel {
|
||||
}
|
||||
|
||||
hide(): void {
|
||||
this.validate();
|
||||
this._proxy.$close(this._id);
|
||||
}
|
||||
|
||||
private validate(): void {
|
||||
if (this._disposed) {
|
||||
throw new Error('Channel has been closed');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export class ExtHostOutputService {
|
||||
|
||||
Reference in New Issue
Block a user