@@ -7,7 +7,7 @@ import { dispose as disposeTelemetryWrapper, initializeFromJsonFile, instrumentO
77import { navigateToTestOrTarget } from './commands/navigation/navigationCommands' ;
88import { generateTests } from './commands/generationCommands' ;
99import { runTestsFromJavaProjectExplorer } from './commands/projectExplorerCommands' ;
10- import { refresh , runTestsFromTestExplorer } from './commands/testExplorerCommands' ;
10+ import { refreshExplorer , runTestsFromTestExplorer } from './commands/testExplorerCommands' ;
1111import { openStackTrace } from './commands/testReportCommands' ;
1212import { Context , ExtensionName , JavaTestRunnerCommands , VSCodeCommands } from './constants' ;
1313import { createTestController , testController , watchers } from './controller/testController' ;
@@ -65,7 +65,7 @@ async function doActivate(_operationId: string, context: ExtensionContext): Prom
6565 // workaround: wait more time to make sure Language Server has updated all caches
6666 setTimeout ( ( ) => {
6767 testSourceProvider . clear ( ) ;
68- commands . executeCommand ( JavaTestRunnerCommands . REFRESH_TEST_EXPLORER ) ;
68+ refreshExplorer ( ) ;
6969 } , 1000 /*ms*/ ) ;
7070 } ) ) ;
7171 }
@@ -74,7 +74,7 @@ async function doActivate(_operationId: string, context: ExtensionContext): Prom
7474 const onDidProjectsImport : Event < Uri [ ] > = extensionApi . onDidProjectsImport ;
7575 context . subscriptions . push ( onDidProjectsImport ( async ( ) => {
7676 testSourceProvider . clear ( ) ;
77- commands . executeCommand ( JavaTestRunnerCommands . REFRESH_TEST_EXPLORER ) ;
77+ refreshExplorer ( ) ;
7878 } ) ) ;
7979 }
8080
@@ -107,7 +107,6 @@ function registerComponents(context: ExtensionContext): void {
107107 instrumentOperationAsVsCodeCommand ( JavaTestRunnerCommands . JAVA_TEST_GENERATE_TESTS , ( ( uri : Uri , startPosition : number ) => generateTests ( uri , startPosition ) ) ) ,
108108 instrumentOperationAsVsCodeCommand ( JavaTestRunnerCommands . RUN_FROM_TEST_EXPLORER , async ( node : TestItem , launchConfiguration : DebugConfiguration ) => await runTestsFromTestExplorer ( node , launchConfiguration , false ) ) ,
109109 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 ( ) ) ,
111110 instrumentOperationAsVsCodeCommand ( JavaTestRunnerCommands . RUN_TEST_FROM_JAVA_PROJECT_EXPLORER , async ( node : any ) => await runTestsFromJavaProjectExplorer ( node , false /* isDebug */ ) ) ,
112111 instrumentOperationAsVsCodeCommand ( JavaTestRunnerCommands . DEBUG_TEST_FROM_JAVA_PROJECT_EXPLORER , async ( node : any ) => await runTestsFromJavaProjectExplorer ( node , true /* isDebug */ ) ) ,
113112 instrumentOperationAsVsCodeCommand ( JavaTestRunnerCommands . GO_TO_TEST , async ( ) => await navigateToTestOrTarget ( true ) ) ,
0 commit comments