Skip to content

Commit

Permalink
Register 'workbench.action.files.openFileFolder' VS Code command
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Nikitenko <[email protected]>
  • Loading branch information
RomanNikitenko committed Mar 17, 2021
1 parent 9f13354 commit b01fa23
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)
});
Expand Down

0 comments on commit b01fa23

Please sign in to comment.