add push/pull option for output channels

This commit is contained in:
Sandeep Somavarapu
2018-09-06 21:07:01 +02:00
parent ad592db0ee
commit 8c26e721ee
2 changed files with 11 additions and 14 deletions

View File

@@ -61,8 +61,6 @@ import { ExtHostWebviews } from 'vs/workbench/api/node/extHostWebview';
import { ExtHostComments } from './extHostComments';
import { ExtHostSearch } from './extHostSearch';
import { ExtHostUrls } from './extHostUrls';
import { toLocalISOString } from 'vs/base/common/date';
import { posix } from 'path';
export interface IExtensionApiFactory {
(extension: IExtensionDescription): typeof vscode;
@@ -138,8 +136,7 @@ export function createApiFactory(
const extHostMessageService = new ExtHostMessageService(rpcProtocol);
const extHostDialogs = new ExtHostDialogs(rpcProtocol);
const extHostStatusBar = new ExtHostStatusBar(rpcProtocol);
const outputPath = posix.join(initData.logsLocation.fsPath, `output_logging_${toLocalISOString(new Date()).replace(/-|:|\.\d+Z$/g, '')}`);
const extHostOutputService = new ExtHostOutputService(outputPath, rpcProtocol);
const extHostOutputService = new ExtHostOutputService(initData.logsLocation, rpcProtocol);
const extHostLanguages = new ExtHostLanguages(rpcProtocol);
// Register API-ish commands
@@ -435,8 +432,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): vscode.OutputChannel {
return extHostOutputService.createOutputChannel(name);
createOutputChannel(name: string, push?: boolean): vscode.OutputChannel {
return extHostOutputService.createOutputChannel(name, push);
},
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);