Provide API to open a new folder (fixes #58)

* Provide API to open a new folder (fixes #58)

* extract more generic command

* use underscore to prevent command from showing in keybindings list
This commit is contained in:
Benjamin Pasero
2016-04-04 18:21:32 +02:00
parent 6486b19395
commit 6b37039312
2 changed files with 31 additions and 1 deletions

View File

@@ -162,6 +162,13 @@ class ExtHostApiCommands {
{ name: 'column', description: '(optional) Column in which to preview.' },
]
});
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.',
args: [
{ name: 'uri', description: 'Uri of the folder to open.', constraint: URI }
]
});
}
// --- command impl