Skip to content

Commit a5580c3

Browse files
committed
microsoft#59322 Remove the options
1 parent 515c90a commit a5580c3

File tree

3 files changed

+9
-18
lines changed

3 files changed

+9
-18
lines changed

src/vs/vscode.d.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6226,14 +6226,9 @@ declare module 'vscode' {
62266226
/**
62276227
* Creates a new [output channel](#OutputChannel) with the given name.
62286228
*
6229-
* By default, Output channels use a separate transport mechanism when appending data.
6230-
* This helps to reduce CPU load on the UI process but also means that the output channel UI updates with a small delay.
6231-
* Use the force-flag to enforce immediate updates at the cost of higher CPU usage.
6232-
*
62336229
* @param name Human-readable string which will be used to represent the channel in the UI.
6234-
* @param options Options to control how the channel will be created.
62356230
*/
6236-
export function createOutputChannel(name: string, options?: { force?: boolean }): OutputChannel;
6231+
export function createOutputChannel(name: string): OutputChannel;
62376232

62386233
/**
62396234
* Create and show a new webview panel.

src/vs/workbench/api/node/extHost.api.impl.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,8 +435,8 @@ export function createApiFactory(
435435
withProgress<R>(options: vscode.ProgressOptions, task: (progress: vscode.Progress<{ message?: string; worked?: number }>, token: vscode.CancellationToken) => Thenable<R>) {
436436
return extHostProgress.withProgress(extension, options, task);
437437
},
438-
createOutputChannel(name: string, options?: { force?: boolean }): vscode.OutputChannel {
439-
return extHostOutputService.createOutputChannel(name, options);
438+
createOutputChannel(name: string): vscode.OutputChannel {
439+
return extHostOutputService.createOutputChannel(name);
440440
},
441441
createWebviewPanel(viewType: string, title: string, showOptions: vscode.ViewColumn | { viewColumn: vscode.ViewColumn, preserveFocus?: boolean }, options: vscode.WebviewPanelOptions & vscode.WebviewOptions): vscode.WebviewPanel {
442442
return extHostWebviews.createWebview(extension.extensionLocation, viewType, title, showOptions, options);

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

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -122,21 +122,17 @@ export class ExtHostOutputService {
122122
this._proxy = mainContext.getProxy(MainContext.MainThreadOutputService);
123123
}
124124

125-
createOutputChannel(name: string, options?: { force?: boolean }): vscode.OutputChannel {
125+
createOutputChannel(name: string): vscode.OutputChannel {
126126
name = name.trim();
127127
if (!name) {
128128
throw new Error('illegal argument `name`. must not be falsy');
129129
} else {
130-
if (options && options.force) {
130+
// Do not crash if logger cannot be created
131+
try {
132+
return new ExtHostOutputChannelBackedByFile(name, this._outputDir, this._proxy);
133+
} catch (error) {
134+
console.log(error);
131135
return new ExtHostPushOutputChannel(name, this._proxy);
132-
} else {
133-
// Do not crash if logger cannot be created
134-
try {
135-
return new ExtHostOutputChannelBackedByFile(name, this._outputDir, this._proxy);
136-
} catch (error) {
137-
console.log(error);
138-
return new ExtHostPushOutputChannel(name, this._proxy);
139-
}
140136
}
141137
}
142138
}

0 commit comments

Comments
 (0)