@@ -41,6 +41,8 @@ import { Disposable } from 'vs/base/common/lifecycle';
41
41
const OpenInEditorCommandId = 'search.action.openInEditor' ;
42
42
const OpenNewEditorToSideCommandId = 'search.action.openNewEditorToSide' ;
43
43
const FocusQueryEditorWidgetCommandId = 'search.action.focusQueryEditorWidget' ;
44
+ const FocusQueryEditorFilesToIncludeCommandId = 'search.action.focusFilesToInclude' ;
45
+ const FocusQueryEditorFilesToExcludeCommandId = 'search.action.focusFilesToExclude' ;
44
46
45
47
const ToggleSearchEditorCaseSensitiveCommandId = 'toggleSearchEditorCaseSensitive' ;
46
48
const ToggleSearchEditorWholeWordCommandId = 'toggleSearchEditorWholeWord' ;
@@ -374,6 +376,44 @@ registerAction2(class extends Action2 {
374
376
}
375
377
} ) ;
376
378
379
+ registerAction2 ( class extends Action2 {
380
+ constructor ( ) {
381
+ super ( {
382
+ id : FocusQueryEditorFilesToIncludeCommandId ,
383
+ title : { value : localize ( 'search.action.focusFilesToInclude' , "Focus Search Editor Files to Include" ) , original : 'Focus Search Editor Files to Include' } ,
384
+ category,
385
+ f1 : true ,
386
+ precondition : SearchEditorConstants . InSearchEditor ,
387
+ } ) ;
388
+ }
389
+ async run ( accessor : ServicesAccessor ) {
390
+ const editorService = accessor . get ( IEditorService ) ;
391
+ const input = editorService . activeEditor ;
392
+ if ( input instanceof SearchEditorInput ) {
393
+ ( editorService . activeEditorPane as SearchEditor ) . focusFilesToIncludeInput ( ) ;
394
+ }
395
+ }
396
+ } ) ;
397
+
398
+ registerAction2 ( class extends Action2 {
399
+ constructor ( ) {
400
+ super ( {
401
+ id : FocusQueryEditorFilesToExcludeCommandId ,
402
+ title : { value : localize ( 'search.action.focusFilesToExclude' , "Focus Search Editor Files to Exclude" ) , original : 'Focus Search Editor Files to Exclude' } ,
403
+ category,
404
+ f1 : true ,
405
+ precondition : SearchEditorConstants . InSearchEditor ,
406
+ } ) ;
407
+ }
408
+ async run ( accessor : ServicesAccessor ) {
409
+ const editorService = accessor . get ( IEditorService ) ;
410
+ const input = editorService . activeEditor ;
411
+ if ( input instanceof SearchEditorInput ) {
412
+ ( editorService . activeEditorPane as SearchEditor ) . focusFilesToExcludeInput ( ) ;
413
+ }
414
+ }
415
+ } ) ;
416
+
377
417
registerAction2 ( class extends Action2 {
378
418
constructor ( ) {
379
419
super ( {
0 commit comments