@@ -552,27 +552,24 @@ class ExtensionManager implements vscode.Disposable {
552
552
title : string ;
553
553
persistMode : 'user' | 'workspace' ;
554
554
}
555
- const persist_pr
556
- // Try to persist the user's selection to a `settings.json`
557
- = vscode . window
558
- . showInformationMessage < Choice2 > (
559
- perist_message ,
560
- { } ,
561
- { title : button_messages [ 0 ] , persistMode : 'user' } ,
562
- { title : button_messages [ 1 ] , persistMode : 'workspace' }
563
- )
564
- . then ( async choice => {
565
- if ( ! choice ) {
566
- // Use cancelled. Do nothing.
567
- return ;
568
- }
569
- const config = vscode . workspace . getConfiguration ( undefined , ws . uri ) ;
570
- let config_target = vscode . ConfigurationTarget . Global ;
571
- if ( choice . persistMode === 'workspace' ) {
572
- config_target = vscode . ConfigurationTarget . WorkspaceFolder ;
573
- }
574
- await config . update ( 'cmake.configureOnOpen' , chosen . doConfigure , config_target ) ;
575
- } ) ;
555
+ // Try to persist the user's selection to a `settings.json`
556
+ const persist_pr = vscode . window . showInformationMessage < Choice2 > (
557
+ perist_message ,
558
+ { } ,
559
+ { title : button_messages [ 0 ] , persistMode : 'user' } ,
560
+ { title : button_messages [ 1 ] , persistMode : 'workspace' } )
561
+ . then ( async choice => {
562
+ if ( ! choice ) {
563
+ // Use cancelled. Do nothing.
564
+ return ;
565
+ }
566
+ const config = vscode . workspace . getConfiguration ( undefined , ws . uri ) ;
567
+ let config_target = vscode . ConfigurationTarget . Global ;
568
+ if ( choice . persistMode === 'workspace' ) {
569
+ config_target = vscode . ConfigurationTarget . WorkspaceFolder ;
570
+ }
571
+ await config . update ( 'cmake.configureOnOpen' , chosen . doConfigure , config_target ) ;
572
+ } ) ;
576
573
rollbar . takePromise ( localize ( 'persist.config.on.open.setting' , 'Persist config-on-open setting' ) , { } , persist_pr ) ;
577
574
should_configure = chosen . doConfigure ;
578
575
}
@@ -683,17 +680,7 @@ class ExtensionManager implements vscode.Disposable {
683
680
}
684
681
685
682
private _disposeSubs ( ) {
686
- for ( const sub of [ this . _statusMessageSub ,
687
- this . _targetNameSub ,
688
- this . _buildTypeSub ,
689
- this . _launchTargetSub ,
690
- this . _ctestEnabledSub ,
691
- this . _testResultsSub ,
692
- this . _isBusySub ,
693
- this . _activeConfigurePresetSub ,
694
- this . _activeBuildPresetSub ,
695
- this . _activeTestPresetSub
696
- ] ) {
683
+ for ( const sub of [ this . _statusMessageSub , this . _targetNameSub , this . _buildTypeSub , this . _launchTargetSub , this . _ctestEnabledSub , this . _testResultsSub , this . _isBusySub , this . _activeConfigurePresetSub , this . _activeBuildPresetSub , this . _activeTestPresetSub ] ) {
697
684
sub . dispose ( ) ;
698
685
}
699
686
}
@@ -838,10 +825,9 @@ class ExtensionManager implements vscode.Disposable {
838
825
/**
839
826
* Watches for changes to the kits file
840
827
*/
841
- private readonly _kitsWatcher =
842
- util . chokidarOnAnyChange ( chokidar . watch ( USER_KITS_FILEPATH ,
843
- { ignoreInitial : true } ) ,
844
- _ => rollbar . takePromise ( localize ( 'rereading.kits' , 'Re-reading kits' ) , { } , KitsController . readUserKits ( this . _folders . activeFolder ?. cmakeTools ) ) ) ;
828
+ private readonly _kitsWatcher = util . chokidarOnAnyChange (
829
+ chokidar . watch ( USER_KITS_FILEPATH , { ignoreInitial : true } ) ,
830
+ _ => rollbar . takePromise ( localize ( 'rereading.kits' , 'Re-reading kits' ) , { } , KitsController . readUserKits ( this . _folders . activeFolder ?. cmakeTools ) ) ) ;
845
831
846
832
/**
847
833
* Set the current kit for the specified workspace folder
@@ -1149,9 +1135,8 @@ class ExtensionManager implements vscode.Disposable {
1149
1135
}
1150
1136
1151
1137
configure ( folder ?: vscode . WorkspaceFolder , showCommandOnly ?: boolean ) {
1152
- return this . mapCMakeToolsFolder ( cmt => cmt . configureInternal ( ConfigureTrigger . commandConfigure ,
1153
- [ ] ,
1154
- showCommandOnly ? ConfigureType . ShowCommandOnly : ConfigureType . Normal ) ,
1138
+ return this . mapCMakeToolsFolder (
1139
+ cmt => cmt . configureInternal ( ConfigureTrigger . commandConfigure , [ ] , showCommandOnly ? ConfigureType . ShowCommandOnly : ConfigureType . Normal ) ,
1155
1140
folder , undefined , true ) ;
1156
1141
}
1157
1142
0 commit comments