11import * as path from 'path' ;
2- import { OutputChannel , QuickPickItem , Uri , window } from 'vscode' ;
2+ import { OutputChannel , QuickPickItem , Uri } from 'vscode' ;
3+ import { IApplicationShell } from '../../../common/application/types' ;
34import { IInstaller , IOutputChannel , Product } from '../../../common/types' ;
45import { createDeferred } from '../../../common/utils/async' ;
56import { getSubDirectories } from '../../../common/utils/fs' ;
@@ -38,6 +39,7 @@ export abstract class TestConfigurationManager implements ITestConfigurationMana
3839 }
3940 protected selectTestDir ( rootDir : string , subDirs : string [ ] , customOptions : QuickPickItem [ ] = [ ] ) : Promise < string > {
4041 const options = {
42+ ignoreFocusOut : true ,
4143 matchOnDescription : true ,
4244 matchOnDetail : true ,
4345 placeHolder : 'Select the directory containing the unit tests'
@@ -59,7 +61,8 @@ export abstract class TestConfigurationManager implements ITestConfigurationMana
5961 items = [ { label : '.' , description : 'Root directory' } , ...items ] ;
6062 items = customOptions . concat ( items ) ;
6163 const def = createDeferred < string > ( ) ;
62- window . showQuickPick ( items , options ) . then ( item => {
64+ const appShell = this . serviceContainer . get < IApplicationShell > ( IApplicationShell ) ;
65+ appShell . showQuickPick ( items , options ) . then ( item => {
6366 if ( ! item ) {
6467 return def . resolve ( ) ;
6568 }
@@ -72,6 +75,7 @@ export abstract class TestConfigurationManager implements ITestConfigurationMana
7275
7376 protected selectTestFilePattern ( ) : Promise < string > {
7477 const options = {
78+ ignoreFocusOut : true ,
7579 matchOnDescription : true ,
7680 matchOnDetail : true ,
7781 placeHolder : 'Select the pattern to identify test files'
@@ -85,7 +89,8 @@ export abstract class TestConfigurationManager implements ITestConfigurationMana
8589 ] ;
8690
8791 const def = createDeferred < string > ( ) ;
88- window . showQuickPick ( items , options ) . then ( item => {
92+ const appShell = this . serviceContainer . get < IApplicationShell > ( IApplicationShell ) ;
93+ appShell . showQuickPick ( items , options ) . then ( item => {
8994 if ( ! item ) {
9095 return def . resolve ( ) ;
9196 }
0 commit comments