Add optional languageId to window.createOutputChannel API (#19561)

This commit is contained in:
gjsjohnmurray
2022-01-17 21:29:04 +00:00
parent 4135ba294b
commit 1ecb5f53a7
10 changed files with 47 additions and 19 deletions

View File

@@ -648,8 +648,11 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
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): vscode.OutputChannel {
return extHostOutputService.createOutputChannel(name, extension);
createOutputChannel(name: string, languageId?: string): vscode.OutputChannel {
if (languageId) {
checkProposedApiEnabled(extension, 'outputChannelLanguage');
}
return extHostOutputService.createOutputChannel(name, languageId || '', extension);
},
createWebviewPanel(viewType: string, title: string, showOptions: vscode.ViewColumn | { viewColumn: vscode.ViewColumn, preserveFocus?: boolean }, options?: vscode.WebviewPanelOptions & vscode.WebviewOptions): vscode.WebviewPanel {
return extHostWebviewPanels.createWebviewPanel(extension, viewType, title, showOptions, options);