diff --git a/packages/editor/src/browser/editor.contribution.ts b/packages/editor/src/browser/editor.contribution.ts index 659b494970..e4e98433fa 100644 --- a/packages/editor/src/browser/editor.contribution.ts +++ b/packages/editor/src/browser/editor.contribution.ts @@ -1172,6 +1172,15 @@ export class EditorContribution order: 3, }); + menus.registerMenuItem(MenuId.EditorTitleContext, { + command: { + id: FILE_COMMANDS.REVEAL_IN_EXPLORER.id, + label: localize('file.revealInExplorer'), + }, + group: '6_file', + order: 3, + }); + menus.registerMenuItem(MenuId.EditorTitleContext, { command: EDITOR_COMMANDS.SPLIT_TO_LEFT.id, group: '9_split', diff --git a/packages/file-tree-next/src/browser/file-tree-contribution.ts b/packages/file-tree-next/src/browser/file-tree-contribution.ts index bc4764edef..2c521225f6 100644 --- a/packages/file-tree-next/src/browser/file-tree-contribution.ts +++ b/packages/file-tree-next/src/browser/file-tree-contribution.ts @@ -937,7 +937,9 @@ export class FileTreeContribution } commands.registerCommand(FILE_COMMANDS.REVEAL_IN_EXPLORER, { - execute: (uri?: URI) => { + execute: (uriOrResource?: URI | { uri?: URI }) => { + let uri = uriOrResource instanceof URI ? uriOrResource : uriOrResource?.uri; + const handler = this.mainLayoutService.getTabbarHandler(EXPLORER_CONTAINER_ID); if (handler && !handler.isVisible) { handler.activate();