@@ -315,15 +315,19 @@ export class StandardLanguageClient {
315315 commands . executeCommand ( Commands . SHOW_REFERENCES , Uri . parse ( uri ) , this . languageClient . protocol2CodeConverter . asPosition ( position ) , locations . map ( this . languageClient . protocol2CodeConverter . asLocation ) ) ;
316316 } ) ) ;
317317
318- context . subscriptions . push ( commands . registerCommand ( Commands . CONFIGURATION_UPDATE , uri => projectConfigurationUpdate ( this . languageClient , uri ) ) ) ;
318+ context . subscriptions . push ( commands . registerCommand ( Commands . CONFIGURATION_UPDATE , async ( uri ) => {
319+ await projectConfigurationUpdate ( this . languageClient , uri ) ;
320+ } ) ) ;
319321
320322 context . subscriptions . push ( commands . registerCommand ( Commands . IGNORE_INCOMPLETE_CLASSPATH , ( ) => setIncompleteClasspathSeverity ( 'ignore' ) ) ) ;
321323
322324 context . subscriptions . push ( commands . registerCommand ( Commands . IGNORE_INCOMPLETE_CLASSPATH_HELP , ( ) => {
323325 commands . executeCommand ( Commands . OPEN_BROWSER , Uri . parse ( 'https://github.com/redhat-developer/vscode-java/wiki/%22Classpath-is-incomplete%22-warning' ) ) ;
324326 } ) ) ;
325327
326- context . subscriptions . push ( commands . registerCommand ( Commands . PROJECT_CONFIGURATION_STATUS , ( uri , status ) => setProjectConfigurationUpdate ( this . languageClient , uri , status ) ) ) ;
328+ context . subscriptions . push ( commands . registerCommand ( Commands . PROJECT_CONFIGURATION_STATUS , async ( uri , status ) => {
329+ await setProjectConfigurationUpdate ( this . languageClient , uri , status ) ;
330+ } ) ) ;
327331
328332 context . subscriptions . push ( commands . registerCommand ( Commands . APPLY_WORKSPACE_EDIT , ( obj ) => {
329333 applyWorkspaceEdit ( obj , this . languageClient ) ;
@@ -582,7 +586,7 @@ function setIncompleteClasspathSeverity(severity: string) {
582586 ) ;
583587}
584588
585- function projectConfigurationUpdate ( languageClient : LanguageClient , uri ?: Uri ) {
589+ async function projectConfigurationUpdate ( languageClient : LanguageClient , uri ?: Uri ) {
586590 let resource = uri ;
587591 if ( ! ( resource instanceof Uri ) ) {
588592 if ( window . activeTextEditor ) {
@@ -593,7 +597,7 @@ function projectConfigurationUpdate(languageClient: LanguageClient, uri?: Uri) {
593597 return window . showWarningMessage ( 'No Java project to update!' ) . then ( ( ) => false ) ;
594598 }
595599 if ( isJavaConfigFile ( resource . path ) ) {
596- languageClient . sendNotification ( ProjectConfigurationUpdateRequest . type , {
600+ await languageClient . sendNotification ( ProjectConfigurationUpdateRequest . type , {
597601 uri : resource . toString ( )
598602 } ) ;
599603 }
@@ -605,7 +609,7 @@ function isJavaConfigFile(filePath: string) {
605609 return regEx . test ( fileName ) ;
606610}
607611
608- function setProjectConfigurationUpdate ( languageClient : LanguageClient , uri : Uri , status : FeatureStatus ) {
612+ async function setProjectConfigurationUpdate ( languageClient : LanguageClient , uri : Uri , status : FeatureStatus ) {
609613 const config = getJavaConfiguration ( ) ;
610614 const section = 'configuration.updateBuildConfiguration' ;
611615
@@ -615,7 +619,7 @@ function setProjectConfigurationUpdate(languageClient: LanguageClient, uri: Uri,
615619 ( error ) => logger . error ( error )
616620 ) ;
617621 if ( status !== FeatureStatus . disabled ) {
618- projectConfigurationUpdate ( languageClient , uri ) ;
622+ await projectConfigurationUpdate ( languageClient , uri ) ;
619623 }
620624}
621625
0 commit comments