From 1dc3cd2ab8a1845f209adf1b48632fb2378029fa Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 5 Apr 2016 10:42:41 +0200 Subject: [PATCH] vscode.openFolder: allow to open as new window --- src/vs/workbench/api/node/extHostApiCommands.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/api/node/extHostApiCommands.ts b/src/vs/workbench/api/node/extHostApiCommands.ts index 5e2daec330c..fff3803aa2e 100644 --- a/src/vs/workbench/api/node/extHostApiCommands.ts +++ b/src/vs/workbench/api/node/extHostApiCommands.ts @@ -163,10 +163,11 @@ class ExtHostApiCommands { ] }); - this._register('vscode.openFolder', (uri: URI) => this._commands.executeCommand('_workbench.ipc', 'vscode:windowOpen', [[uri.fsPath]]), { - description: 'Open a folder in the current window. Note that this will shutdown the current extension host process and start a new one on the given folder.', + this._register('vscode.openFolder', (uri: URI, newWindow?: boolean) => this._commands.executeCommand('_workbench.ipc', 'vscode:windowOpen', [[uri.fsPath], newWindow]), { + description: 'Open a folder in the current window. Note that this will shutdown the current extension host process and start a new one on the given folder unless the newWindow parameter is set to true.', args: [ - { name: 'uri', description: 'Uri of the folder to open.', constraint: URI } + { name: 'uri', description: 'Uri of the folder to open.', constraint: URI }, + { name: 'newWindow', description: '(optional) Wether to open the folder in a new window or the same. Defaults to opening in the same window.' } ] }); }