From b01fa2353fa3e85f05508033854355dc3749902f Mon Sep 17 00:00:00 2001 From: Roman Nikitenko Date: Wed, 17 Mar 2021 13:26:47 +0200 Subject: [PATCH] Register 'workbench.action.files.openFileFolder' VS Code command Signed-off-by: Roman Nikitenko --- .../src/browser/plugin-vscode-commands-contribution.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/plugin-ext-vscode/src/browser/plugin-vscode-commands-contribution.ts b/packages/plugin-ext-vscode/src/browser/plugin-vscode-commands-contribution.ts index 4c38cfaf828e3..d5a173465af2c 100755 --- a/packages/plugin-ext-vscode/src/browser/plugin-vscode-commands-contribution.ts +++ b/packages/plugin-ext-vscode/src/browser/plugin-vscode-commands-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { Command, CommandContribution, CommandRegistry } from '@theia/core'; +import { Command, CommandContribution, CommandRegistry, environment, isOSX } from '@theia/core'; import { ApplicationShell, CommonCommands, @@ -194,6 +194,13 @@ export class PluginVscodeCommandsContribution implements CommandContribution { commands.registerCommand({ id: 'workbench.action.files.newUntitledFile' }, { execute: () => open(this.openerService, createUntitledURI()) }); + + if (!environment.electron.is() || isOSX) { + commands.registerCommand({ id: 'workbench.action.files.openFileFolder' }, { + execute: () => commands.executeCommand(WorkspaceCommands.OPEN.id) + }); + } + commands.registerCommand({ id: 'workbench.action.files.openFile' }, { execute: () => commands.executeCommand(WorkspaceCommands.OPEN_FILE.id) });