mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 18:49:00 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user