@@ -7,7 +7,7 @@ import { dispose as disposeTelemetryWrapper, initializeFromJsonFile, instrumentO
7
7
import { navigateToTestOrTarget } from './commands/navigation/navigationCommands' ;
8
8
import { generateTests } from './commands/generationCommands' ;
9
9
import { runTestsFromJavaProjectExplorer } from './commands/projectExplorerCommands' ;
10
- import { refresh , runTestsFromTestExplorer } from './commands/testExplorerCommands' ;
10
+ import { refreshExplorer , runTestsFromTestExplorer } from './commands/testExplorerCommands' ;
11
11
import { openStackTrace } from './commands/testReportCommands' ;
12
12
import { Context , ExtensionName , JavaTestRunnerCommands , VSCodeCommands } from './constants' ;
13
13
import { createTestController , testController , watchers } from './controller/testController' ;
@@ -65,7 +65,7 @@ async function doActivate(_operationId: string, context: ExtensionContext): Prom
65
65
// workaround: wait more time to make sure Language Server has updated all caches
66
66
setTimeout ( ( ) => {
67
67
testSourceProvider . clear ( ) ;
68
- commands . executeCommand ( JavaTestRunnerCommands . REFRESH_TEST_EXPLORER ) ;
68
+ refreshExplorer ( ) ;
69
69
} , 1000 /*ms*/ ) ;
70
70
} ) ) ;
71
71
}
@@ -74,7 +74,7 @@ async function doActivate(_operationId: string, context: ExtensionContext): Prom
74
74
const onDidProjectsImport : Event < Uri [ ] > = extensionApi . onDidProjectsImport ;
75
75
context . subscriptions . push ( onDidProjectsImport ( async ( ) => {
76
76
testSourceProvider . clear ( ) ;
77
- commands . executeCommand ( JavaTestRunnerCommands . REFRESH_TEST_EXPLORER ) ;
77
+ refreshExplorer ( ) ;
78
78
} ) ) ;
79
79
}
80
80
@@ -107,7 +107,6 @@ function registerComponents(context: ExtensionContext): void {
107
107
instrumentOperationAsVsCodeCommand ( JavaTestRunnerCommands . JAVA_TEST_GENERATE_TESTS , ( ( uri : Uri , startPosition : number ) => generateTests ( uri , startPosition ) ) ) ,
108
108
instrumentOperationAsVsCodeCommand ( JavaTestRunnerCommands . RUN_FROM_TEST_EXPLORER , async ( node : TestItem , launchConfiguration : DebugConfiguration ) => await runTestsFromTestExplorer ( node , launchConfiguration , false ) ) ,
109
109
instrumentOperationAsVsCodeCommand ( JavaTestRunnerCommands . DEBUG_FROM_TEST_EXPLORER , async ( node : TestItem , launchConfiguration : DebugConfiguration ) => await runTestsFromTestExplorer ( node , launchConfiguration , false ) ) ,
110
- instrumentOperationAsVsCodeCommand ( JavaTestRunnerCommands . REFRESH_TEST_EXPLORER , async ( ) => await refresh ( ) ) ,
111
110
instrumentOperationAsVsCodeCommand ( JavaTestRunnerCommands . RUN_TEST_FROM_JAVA_PROJECT_EXPLORER , async ( node : any ) => await runTestsFromJavaProjectExplorer ( node , false /* isDebug */ ) ) ,
112
111
instrumentOperationAsVsCodeCommand ( JavaTestRunnerCommands . DEBUG_TEST_FROM_JAVA_PROJECT_EXPLORER , async ( node : any ) => await runTestsFromJavaProjectExplorer ( node , true /* isDebug */ ) ) ,
113
112
instrumentOperationAsVsCodeCommand ( JavaTestRunnerCommands . GO_TO_TEST , async ( ) => await navigateToTestOrTarget ( true ) ) ,
0 commit comments