mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 03:29:00 +01:00
#59322 Remove the options
This commit is contained in:
@@ -435,8 +435,8 @@ export function createApiFactory(
|
||||
withProgress<R>(options: vscode.ProgressOptions, task: (progress: vscode.Progress<{ message?: string; worked?: number }>, token: vscode.CancellationToken) => Thenable<R>) {
|
||||
return extHostProgress.withProgress(extension, options, task);
|
||||
},
|
||||
createOutputChannel(name: string, options?: { force?: boolean }): vscode.OutputChannel {
|
||||
return extHostOutputService.createOutputChannel(name, options);
|
||||
createOutputChannel(name: string): vscode.OutputChannel {
|
||||
return extHostOutputService.createOutputChannel(name);
|
||||
},
|
||||
createWebviewPanel(viewType: string, title: string, showOptions: vscode.ViewColumn | { viewColumn: vscode.ViewColumn, preserveFocus?: boolean }, options: vscode.WebviewPanelOptions & vscode.WebviewOptions): vscode.WebviewPanel {
|
||||
return extHostWebviews.createWebview(extension.extensionLocation, viewType, title, showOptions, options);
|
||||
|
||||
@@ -122,21 +122,17 @@ export class ExtHostOutputService {
|
||||
this._proxy = mainContext.getProxy(MainContext.MainThreadOutputService);
|
||||
}
|
||||
|
||||
createOutputChannel(name: string, options?: { force?: boolean }): vscode.OutputChannel {
|
||||
createOutputChannel(name: string): vscode.OutputChannel {
|
||||
name = name.trim();
|
||||
if (!name) {
|
||||
throw new Error('illegal argument `name`. must not be falsy');
|
||||
} else {
|
||||
if (options && options.force) {
|
||||
// Do not crash if logger cannot be created
|
||||
try {
|
||||
return new ExtHostOutputChannelBackedByFile(name, this._outputDir, this._proxy);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
return new ExtHostPushOutputChannel(name, this._proxy);
|
||||
} else {
|
||||
// Do not crash if logger cannot be created
|
||||
try {
|
||||
return new ExtHostOutputChannelBackedByFile(name, this._outputDir, this._proxy);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
return new ExtHostPushOutputChannel(name, this._proxy);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user