@@ -13,6 +13,7 @@ import { onExtensionChange, collectBuildFilePattern } from "./plugin";
1313import { activationProgressNotification , serverTaskPresenter } from "./serverTaskPresenter" ;
1414import { RequirementsData } from "./requirements" ;
1515import * as net from 'net' ;
16+ import * as fse from 'fs-extra' ;
1617import * as path from 'path' ;
1718import { getJavaConfiguration } from "./utils" ;
1819import { logger } from "./log" ;
@@ -40,11 +41,13 @@ export class StandardLanguageClient {
4041 private languageClient : LanguageClient ;
4142 private status : ClientStatus = ClientStatus . Uninitialized ;
4243
43- public initialize ( context : ExtensionContext , requirements : RequirementsData , clientOptions : LanguageClientOptions , workspacePath : string , jdtEventEmitter : EventEmitter < Uri > , resolve : ( value : ExtensionAPI ) => void ) : void {
44+ public async initialize ( context : ExtensionContext , requirements : RequirementsData , clientOptions : LanguageClientOptions , workspacePath : string , jdtEventEmitter : EventEmitter < Uri > , resolve : ( value : ExtensionAPI ) => void ) : Promise < void > {
4445 if ( this . status !== ClientStatus . Uninitialized ) {
4546 return ;
4647 }
4748
49+ const hasImported : boolean = await fse . pathExists ( path . join ( workspacePath , ".metadata" , ".plugins" ) ) ;
50+
4851 if ( workspace . getConfiguration ( ) . get ( "java.showBuildStatusOnStart.enabled" ) === "terminal" ) {
4952 commands . executeCommand ( Commands . SHOW_SERVER_TASK_STATUS ) ;
5053 }
@@ -97,7 +100,9 @@ export class StandardLanguageClient {
97100 apiManager . updateServerMode ( ServerMode . STANDARD ) ;
98101 apiManager . fireDidServerModeChange ( ServerMode . STANDARD ) ;
99102 activationProgressNotification . hide ( ) ;
100- showImportFinishNotification ( context ) ;
103+ if ( ! hasImported ) {
104+ showImportFinishNotification ( context ) ;
105+ }
101106 break ;
102107 case 'Started' :
103108 this . status = ClientStatus . Started ;
0 commit comments