@@ -10,12 +10,12 @@ import { revertLocalChangesCommand, acceptLocalChangesCommand, CONFLICT_RESOLUTI
1010import { SyncActionDescriptor , MenuId , MenuRegistry , ILocalizedString } from 'vs/platform/actions/common/actions' ;
1111import { IWorkbenchActionRegistry , Extensions as ActionExtensions } from 'vs/workbench/common/actions' ;
1212import { KeyMod , KeyChord , KeyCode } from 'vs/base/common/keyCodes' ;
13- import { openWindowCommand , COPY_PATH_COMMAND_ID , REVEAL_IN_EXPLORER_COMMAND_ID , OPEN_TO_SIDE_COMMAND_ID , REVERT_FILE_COMMAND_ID , SAVE_FILE_COMMAND_ID , SAVE_FILE_LABEL , SAVE_FILE_AS_COMMAND_ID , SAVE_FILE_AS_LABEL , SAVE_ALL_IN_GROUP_COMMAND_ID , OpenEditorsGroupContext , COMPARE_WITH_SAVED_COMMAND_ID , COMPARE_RESOURCE_COMMAND_ID , SELECT_FOR_COMPARE_COMMAND_ID , ResourceSelectedForCompareContext , DirtyEditorContext , COMPARE_SELECTED_COMMAND_ID , REMOVE_ROOT_FOLDER_COMMAND_ID , REMOVE_ROOT_FOLDER_LABEL , SAVE_FILES_COMMAND_ID , COPY_RELATIVE_PATH_COMMAND_ID , SAVE_FILE_WITHOUT_FORMATTING_COMMAND_ID , SAVE_FILE_WITHOUT_FORMATTING_LABEL , newWindowCommand , ReadonlyEditorContext } from 'vs/workbench/contrib/files/browser/fileCommands' ;
13+ import { openWindowCommand , COPY_PATH_COMMAND_ID , REVEAL_IN_EXPLORER_COMMAND_ID , OPEN_TO_SIDE_COMMAND_ID , REVERT_FILE_COMMAND_ID , SAVE_FILE_COMMAND_ID , SAVE_FILE_LABEL , SAVE_FILE_AS_COMMAND_ID , SAVE_FILE_AS_LABEL , SAVE_ALL_IN_GROUP_COMMAND_ID , OpenEditorsGroupContext , COMPARE_WITH_SAVED_COMMAND_ID , COMPARE_RESOURCE_COMMAND_ID , SELECT_FOR_COMPARE_COMMAND_ID , ResourceSelectedForCompareContext , DirtyEditorContext , COMPARE_SELECTED_COMMAND_ID , REMOVE_ROOT_FOLDER_COMMAND_ID , REMOVE_ROOT_FOLDER_LABEL , SAVE_FILES_COMMAND_ID , COPY_RELATIVE_PATH_COMMAND_ID , SAVE_FILE_WITHOUT_FORMATTING_COMMAND_ID , SAVE_FILE_WITHOUT_FORMATTING_LABEL , newWindowCommand , ReadonlyEditorContext , OPEN_WITH_EXPLORER_COMMAND_ID } from 'vs/workbench/contrib/files/browser/fileCommands' ;
1414import { CommandsRegistry , ICommandHandler } from 'vs/platform/commands/common/commands' ;
1515import { ContextKeyExpr , ContextKeyExpression } from 'vs/platform/contextkey/common/contextkey' ;
1616import { KeybindingsRegistry , KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry' ;
1717import { isMacintosh } from 'vs/base/common/platform' ;
18- import { FilesExplorerFocusCondition , ExplorerRootContext , ExplorerFolderContext , ExplorerResourceNotReadonlyContext , ExplorerResourceCut , IExplorerService , ExplorerResourceMoveableToTrash , ExplorerViewletVisibleContext } from 'vs/workbench/contrib/files/common/files' ;
18+ import { FilesExplorerFocusCondition , ExplorerRootContext , ExplorerFolderContext , ExplorerResourceNotReadonlyContext , ExplorerResourceCut , IExplorerService , ExplorerResourceMoveableToTrash , ExplorerViewletVisibleContext , ExplorerResourceAvailableEditorIdsContext } from 'vs/workbench/contrib/files/common/files' ;
1919import { ADD_ROOT_FOLDER_COMMAND_ID , ADD_ROOT_FOLDER_LABEL } from 'vs/workbench/browser/actions/workspaceCommands' ;
2020import { CLOSE_SAVED_EDITORS_COMMAND_ID , CLOSE_EDITORS_IN_GROUP_COMMAND_ID , CLOSE_EDITOR_COMMAND_ID , CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID } from 'vs/workbench/browser/parts/editor/editorCommands' ;
2121import { AutoSaveAfterShortDelayContext } from 'vs/workbench/services/filesConfiguration/common/filesConfigurationService' ;
@@ -26,7 +26,7 @@ import { WorkspaceFolderCountContext } from 'vs/workbench/browser/contextkeys';
2626import { IsWebContext } from 'vs/platform/contextkey/common/contextkeys' ;
2727import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation' ;
2828import { OpenFileFolderAction , OpenFileAction , OpenFolderAction , OpenWorkspaceAction } from 'vs/workbench/browser/actions/workspaceActions' ;
29- import { ActiveEditorIsReadonlyContext , DirtyWorkingCopiesContext , ActiveEditorContext , ActiveEditorAvailableEditorsContext } from 'vs/workbench/common/editor' ;
29+ import { ActiveEditorIsReadonlyContext , DirtyWorkingCopiesContext , ActiveEditorContext , ActiveEditorAvailableEditorIdsContext } from 'vs/workbench/common/editor' ;
3030import { SidebarFocusContext } from 'vs/workbench/common/viewlet' ;
3131import { ThemeIcon } from 'vs/platform/theme/common/themeService' ;
3232
@@ -36,7 +36,7 @@ const category = { value: nls.localize('filesCategory', "File"), original: 'File
3636const registry = Registry . as < IWorkbenchActionRegistry > ( ActionExtensions . WorkbenchActions ) ;
3737registry . registerWorkbenchAction ( SyncActionDescriptor . from ( SaveAllAction , { primary : undefined , mac : { primary : KeyMod . CtrlCmd | KeyMod . Alt | KeyCode . KEY_S } , win : { primary : KeyChord ( KeyMod . CtrlCmd | KeyCode . KEY_K , KeyCode . KEY_S ) } } ) , 'File: Save All' , category . value ) ;
3838registry . registerWorkbenchAction ( SyncActionDescriptor . from ( GlobalCompareResourcesAction ) , 'File: Compare Active File With...' , category . value ) ;
39- registry . registerWorkbenchAction ( SyncActionDescriptor . from ( ReopenResourcesAction ) , 'File: Reopen With...' , category . value , ActiveEditorAvailableEditorsContext ) ;
39+ registry . registerWorkbenchAction ( SyncActionDescriptor . from ( ReopenResourcesAction ) , 'File: Reopen With...' , category . value , ActiveEditorAvailableEditorIdsContext ) ;
4040registry . registerWorkbenchAction ( SyncActionDescriptor . from ( FocusFilesExplorer ) , 'File: Focus on Files Explorer' , category . value ) ;
4141registry . registerWorkbenchAction ( SyncActionDescriptor . from ( ShowActiveFileInExplorer ) , 'File: Reveal Active File in Side Bar' , category . value ) ;
4242registry . registerWorkbenchAction ( SyncActionDescriptor . from ( CollapseExplorerView ) , 'File: Collapse Folders in Explorer' , category . value ) ;
@@ -192,7 +192,7 @@ MenuRegistry.appendMenuItem(MenuId.EditorTitle, {
192192 } ,
193193 group : '6_reopen' ,
194194 order : 20 ,
195- when : ActiveEditorAvailableEditorsContext ,
195+ when : ActiveEditorAvailableEditorIdsContext ,
196196} ) ;
197197
198198// Editor Title Menu for Conflict Resolution
@@ -435,6 +435,16 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
435435 when : ContextKeyExpr . and ( ExplorerFolderContext . toNegated ( ) , ResourceContextKey . HasResource )
436436} ) ;
437437
438+ MenuRegistry . appendMenuItem ( MenuId . ExplorerContext , {
439+ group : 'navigation' ,
440+ order : 20 ,
441+ command : {
442+ id : OPEN_WITH_EXPLORER_COMMAND_ID ,
443+ title : nls . localize ( 'explorerOpenWith' , "Open With..." ) ,
444+ } ,
445+ when : ContextKeyExpr . and ( ExplorerRootContext . toNegated ( ) , ExplorerResourceAvailableEditorIdsContext ) ,
446+ } ) ;
447+
438448MenuRegistry . appendMenuItem ( MenuId . ExplorerContext , {
439449 group : '3_compare' ,
440450 order : 20 ,
0 commit comments