@@ -8,6 +8,7 @@ import { initializeTesting } from './gnattest';
8
8
import { GprTaskProvider } from './gprTaskProvider' ;
9
9
import { TERMINAL_ENV_SETTING_NAME } from './helpers' ;
10
10
import { registerTaskProviders } from './taskProviders' ;
11
+ import { logger } from './extension' ;
11
12
12
13
/**
13
14
* This class encapsulates all state that should be maintained throughout the
@@ -125,10 +126,13 @@ export class ExtensionState {
125
126
// React to changes in configuration to recompute predefined tasks if the user
126
127
// changes scenario variables' values.
127
128
public configChanged = ( e : vscode . ConfigurationChangeEvent ) => {
129
+ logger . info ( 'didChangeConfiguration event received' ) ;
130
+
128
131
if (
129
132
e . affectsConfiguration ( 'ada.scenarioVariables' ) ||
130
133
e . affectsConfiguration ( 'ada.projectFile' )
131
134
) {
135
+ logger . info ( 'project related settings have changed: clearing caches for tasks' ) ;
132
136
this . clearALSCache ( ) ;
133
137
this . unregisterTaskProviders ( ) ;
134
138
this . registerTaskProviders ( ) ;
@@ -138,6 +142,10 @@ export class ExtensionState {
138
142
// a popup to reload the VS Code window and thus restart the
139
143
// Ada extension.
140
144
if ( e . affectsConfiguration ( TERMINAL_ENV_SETTING_NAME ) ) {
145
+ const new_value = vscode . workspace . getConfiguration ( ) . get ( TERMINAL_ENV_SETTING_NAME ) ;
146
+ logger . info ( `${ TERMINAL_ENV_SETTING_NAME } has changed: show reload popup` ) ;
147
+ logger . info ( `${ TERMINAL_ENV_SETTING_NAME } : ${ JSON . stringify ( new_value , undefined , 2 ) } ` ) ;
148
+
141
149
void this . showReloadWindowPopup ( ) ;
142
150
}
143
151
} ;
0 commit comments