@@ -315,15 +315,19 @@ export class StandardLanguageClient {
315
315
commands . executeCommand ( Commands . SHOW_REFERENCES , Uri . parse ( uri ) , this . languageClient . protocol2CodeConverter . asPosition ( position ) , locations . map ( this . languageClient . protocol2CodeConverter . asLocation ) ) ;
316
316
} ) ) ;
317
317
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
+ } ) ) ;
319
321
320
322
context . subscriptions . push ( commands . registerCommand ( Commands . IGNORE_INCOMPLETE_CLASSPATH , ( ) => setIncompleteClasspathSeverity ( 'ignore' ) ) ) ;
321
323
322
324
context . subscriptions . push ( commands . registerCommand ( Commands . IGNORE_INCOMPLETE_CLASSPATH_HELP , ( ) => {
323
325
commands . executeCommand ( Commands . OPEN_BROWSER , Uri . parse ( 'https://github.com/redhat-developer/vscode-java/wiki/%22Classpath-is-incomplete%22-warning' ) ) ;
324
326
} ) ) ;
325
327
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
+ } ) ) ;
327
331
328
332
context . subscriptions . push ( commands . registerCommand ( Commands . APPLY_WORKSPACE_EDIT , ( obj ) => {
329
333
applyWorkspaceEdit ( obj , this . languageClient ) ;
@@ -582,7 +586,7 @@ function setIncompleteClasspathSeverity(severity: string) {
582
586
) ;
583
587
}
584
588
585
- function projectConfigurationUpdate ( languageClient : LanguageClient , uri ?: Uri ) {
589
+ async function projectConfigurationUpdate ( languageClient : LanguageClient , uri ?: Uri ) {
586
590
let resource = uri ;
587
591
if ( ! ( resource instanceof Uri ) ) {
588
592
if ( window . activeTextEditor ) {
@@ -593,7 +597,7 @@ function projectConfigurationUpdate(languageClient: LanguageClient, uri?: Uri) {
593
597
return window . showWarningMessage ( 'No Java project to update!' ) . then ( ( ) => false ) ;
594
598
}
595
599
if ( isJavaConfigFile ( resource . path ) ) {
596
- languageClient . sendNotification ( ProjectConfigurationUpdateRequest . type , {
600
+ await languageClient . sendNotification ( ProjectConfigurationUpdateRequest . type , {
597
601
uri : resource . toString ( )
598
602
} ) ;
599
603
}
@@ -605,7 +609,7 @@ function isJavaConfigFile(filePath: string) {
605
609
return regEx . test ( fileName ) ;
606
610
}
607
611
608
- function setProjectConfigurationUpdate ( languageClient : LanguageClient , uri : Uri , status : FeatureStatus ) {
612
+ async function setProjectConfigurationUpdate ( languageClient : LanguageClient , uri : Uri , status : FeatureStatus ) {
609
613
const config = getJavaConfiguration ( ) ;
610
614
const section = 'configuration.updateBuildConfiguration' ;
611
615
@@ -615,7 +619,7 @@ function setProjectConfigurationUpdate(languageClient: LanguageClient, uri: Uri,
615
619
( error ) => logger . error ( error )
616
620
) ;
617
621
if ( status !== FeatureStatus . disabled ) {
618
- projectConfigurationUpdate ( languageClient , uri ) ;
622
+ await projectConfigurationUpdate ( languageClient , uri ) ;
619
623
}
620
624
}
621
625
0 commit comments