@@ -114,8 +114,8 @@ const copyRelativePathCommand = {
114114
115115// Editor Title Context Menu
116116appendEditorTitleContextMenuItem ( REVEAL_IN_OS_COMMAND_ID , REVEAL_IN_OS_LABEL , ResourceContextKey . Scheme . isEqualTo ( Schemas . file ) ) ;
117- appendEditorTitleContextMenuItem ( COPY_PATH_COMMAND_ID , copyPathCommand . title , ResourceContextKey . IsFile , copyRelativePathCommand ) ;
118- appendEditorTitleContextMenuItem ( REVEAL_IN_EXPLORER_COMMAND_ID , nls . localize ( 'revealInSideBar' , "Reveal in Side Bar" ) , ResourceContextKey . IsFile ) ;
117+ appendEditorTitleContextMenuItem ( COPY_PATH_COMMAND_ID , copyPathCommand . title , ResourceContextKey . HasResource , copyRelativePathCommand ) ;
118+ appendEditorTitleContextMenuItem ( REVEAL_IN_EXPLORER_COMMAND_ID , nls . localize ( 'revealInSideBar' , "Reveal in Side Bar" ) , ResourceContextKey . HasResource ) ;
119119
120120function appendEditorTitleContextMenuItem ( id : string , title : string , when : ContextKeyExpr , alt ?: { id : string , title : string } ) : void {
121121
@@ -186,7 +186,7 @@ MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
186186 group : 'navigation' ,
187187 order : 10 ,
188188 command : openToSideCommand ,
189- when : ResourceContextKey . IsFile
189+ when : ResourceContextKey . HasResource
190190} ) ;
191191
192192const revealInOsCommand = {
@@ -205,7 +205,7 @@ MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
205205 order : 40 ,
206206 command : copyPathCommand ,
207207 alt : copyRelativePathCommand ,
208- when : ResourceContextKey . IsFile
208+ when : ResourceContextKey . HasResource
209209} ) ;
210210
211211MenuRegistry . appendMenuItem ( MenuId . OpenEditorsContext , {
@@ -216,7 +216,7 @@ MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
216216 title : SAVE_FILE_LABEL ,
217217 precondition : DirtyEditorContext
218218 } ,
219- when : ContextKeyExpr . and ( ResourceContextKey . IsFile , AutoSaveContext . notEqualsTo ( 'afterDelay' ) && AutoSaveContext . notEqualsTo ( '' ) )
219+ when : ContextKeyExpr . and ( ResourceContextKey . Scheme . isEqualTo ( Schemas . file ) , AutoSaveContext . notEqualsTo ( 'afterDelay' ) && AutoSaveContext . notEqualsTo ( '' ) )
220220} ) ;
221221
222222MenuRegistry . appendMenuItem ( MenuId . OpenEditorsContext , {
@@ -227,7 +227,7 @@ MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
227227 title : nls . localize ( 'revert' , "Revert File" ) ,
228228 precondition : DirtyEditorContext
229229 } ,
230- when : ContextKeyExpr . and ( ResourceContextKey . IsFile , AutoSaveContext . notEqualsTo ( 'afterDelay' ) && AutoSaveContext . notEqualsTo ( '' ) )
230+ when : ContextKeyExpr . and ( ResourceContextKey . Scheme . isEqualTo ( Schemas . file ) , AutoSaveContext . notEqualsTo ( 'afterDelay' ) && AutoSaveContext . notEqualsTo ( '' ) )
231231} ) ;
232232
233233MenuRegistry . appendMenuItem ( MenuId . OpenEditorsContext , {
@@ -256,7 +256,7 @@ MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
256256 title : nls . localize ( 'compareWithSaved' , "Compare with Saved" ) ,
257257 precondition : DirtyEditorContext
258258 } ,
259- when : ContextKeyExpr . and ( ResourceContextKey . IsFile , AutoSaveContext . notEqualsTo ( 'afterDelay' ) && AutoSaveContext . notEqualsTo ( '' ) , WorkbenchListDoubleSelection . toNegated ( ) )
259+ when : ContextKeyExpr . and ( ResourceContextKey . Scheme . isEqualTo ( Schemas . file ) , AutoSaveContext . notEqualsTo ( 'afterDelay' ) && AutoSaveContext . notEqualsTo ( '' ) , WorkbenchListDoubleSelection . toNegated ( ) )
260260} ) ;
261261
262262const compareResourceCommand = {
@@ -372,21 +372,21 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
372372 group : '3_compare' ,
373373 order : 20 ,
374374 command : compareResourceCommand ,
375- when : ContextKeyExpr . and ( ExplorerFolderContext . toNegated ( ) , ResourceContextKey . IsFile , ResourceSelectedForCompareContext , WorkbenchListDoubleSelection . toNegated ( ) )
375+ when : ContextKeyExpr . and ( ExplorerFolderContext . toNegated ( ) , ResourceContextKey . HasResource , ResourceSelectedForCompareContext , WorkbenchListDoubleSelection . toNegated ( ) )
376376} ) ;
377377
378378MenuRegistry . appendMenuItem ( MenuId . ExplorerContext , {
379379 group : '3_compare' ,
380380 order : 30 ,
381381 command : selectForCompareCommand ,
382- when : ContextKeyExpr . and ( ExplorerFolderContext . toNegated ( ) , ResourceContextKey . IsFile , WorkbenchListDoubleSelection . toNegated ( ) )
382+ when : ContextKeyExpr . and ( ExplorerFolderContext . toNegated ( ) , ResourceContextKey . HasResource , WorkbenchListDoubleSelection . toNegated ( ) )
383383} ) ;
384384
385385MenuRegistry . appendMenuItem ( MenuId . ExplorerContext , {
386386 group : '3_compare' ,
387387 order : 30 ,
388388 command : compareSelectedCommand ,
389- when : ContextKeyExpr . and ( ExplorerFolderContext . toNegated ( ) , ResourceContextKey . IsFile , WorkbenchListDoubleSelection )
389+ when : ContextKeyExpr . and ( ExplorerFolderContext . toNegated ( ) , ResourceContextKey . HasResource , WorkbenchListDoubleSelection )
390390} ) ;
391391
392392MenuRegistry . appendMenuItem ( MenuId . ExplorerContext , {
@@ -415,7 +415,7 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
415415 order : 30 ,
416416 command : copyPathCommand ,
417417 alt : copyRelativePathCommand ,
418- when : ResourceContextKey . IsFile
418+ when : ResourceContextKey . HasResource
419419} ) ;
420420
421421MenuRegistry . appendMenuItem ( MenuId . ExplorerContext , {
0 commit comments