@@ -315,15 +315,15 @@ 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 ) => projectConfigurationUpdate ( this . languageClient , uri ) ) ) ;
319319
320320 context . subscriptions . push ( commands . registerCommand ( Commands . IGNORE_INCOMPLETE_CLASSPATH , ( ) => setIncompleteClasspathSeverity ( 'ignore' ) ) ) ;
321321
322322 context . subscriptions . push ( commands . registerCommand ( Commands . IGNORE_INCOMPLETE_CLASSPATH_HELP , ( ) => {
323323 commands . executeCommand ( Commands . OPEN_BROWSER , Uri . parse ( 'https://github.com/redhat-developer/vscode-java/wiki/%22Classpath-is-incomplete%22-warning' ) ) ;
324324 } ) ) ;
325325
326- context . subscriptions . push ( commands . registerCommand ( Commands . PROJECT_CONFIGURATION_STATUS , ( uri , status ) => setProjectConfigurationUpdate ( this . languageClient , uri , status ) ) ) ;
326+ context . subscriptions . push ( commands . registerCommand ( Commands . PROJECT_CONFIGURATION_STATUS , async ( uri , status ) => setProjectConfigurationUpdate ( this . languageClient , uri , status ) ) ) ;
327327
328328 context . subscriptions . push ( commands . registerCommand ( Commands . APPLY_WORKSPACE_EDIT , ( obj ) => {
329329 applyWorkspaceEdit ( obj , this . languageClient ) ;
@@ -582,7 +582,7 @@ function setIncompleteClasspathSeverity(severity: string) {
582582 ) ;
583583}
584584
585- function projectConfigurationUpdate ( languageClient : LanguageClient , uri ?: Uri ) {
585+ async function projectConfigurationUpdate ( languageClient : LanguageClient , uri ?: Uri ) {
586586 let resource = uri ;
587587 if ( ! ( resource instanceof Uri ) ) {
588588 if ( window . activeTextEditor ) {
@@ -593,7 +593,7 @@ function projectConfigurationUpdate(languageClient: LanguageClient, uri?: Uri) {
593593 return window . showWarningMessage ( 'No Java project to update!' ) . then ( ( ) => false ) ;
594594 }
595595 if ( isJavaConfigFile ( resource . path ) ) {
596- languageClient . sendNotification ( ProjectConfigurationUpdateRequest . type , {
596+ await languageClient . sendNotification ( ProjectConfigurationUpdateRequest . type , {
597597 uri : resource . toString ( )
598598 } ) ;
599599 }
@@ -605,7 +605,7 @@ function isJavaConfigFile(filePath: string) {
605605 return regEx . test ( fileName ) ;
606606}
607607
608- function setProjectConfigurationUpdate ( languageClient : LanguageClient , uri : Uri , status : FeatureStatus ) {
608+ async function setProjectConfigurationUpdate ( languageClient : LanguageClient , uri : Uri , status : FeatureStatus ) {
609609 const config = getJavaConfiguration ( ) ;
610610 const section = 'configuration.updateBuildConfiguration' ;
611611
@@ -615,7 +615,7 @@ function setProjectConfigurationUpdate(languageClient: LanguageClient, uri: Uri,
615615 ( error ) => logger . error ( error )
616616 ) ;
617617 if ( status !== FeatureStatus . disabled ) {
618- projectConfigurationUpdate ( languageClient , uri ) ;
618+ await projectConfigurationUpdate ( languageClient , uri ) ;
619619 }
620620}
621621
0 commit comments