@@ -57,7 +57,7 @@ export interface DistributionConfig {
57
57
personalAccessToken ?: string ;
58
58
ownerName ?: string ;
59
59
repositoryName ?: string ;
60
- onDidChangeDistributionConfiguration ?: Event < void > ;
60
+ onDidChangeConfiguration ?: Event < void > ;
61
61
}
62
62
63
63
// Query server configuration
@@ -82,22 +82,22 @@ export interface QueryServerConfig {
82
82
numThreads : number ;
83
83
queryMemoryMb ?: number ;
84
84
timeoutSecs : number ;
85
- onDidChangeQueryServerConfiguration ?: Event < void > ;
85
+ onDidChangeConfiguration ?: Event < void > ;
86
86
}
87
87
88
88
/** When these settings change, the query history should be refreshed. */
89
89
const QUERY_HISTORY_SETTINGS = [ QUERY_HISTORY_FORMAT_SETTING ] ;
90
90
91
91
export interface QueryHistoryConfig {
92
92
format : string ;
93
- onDidChangeQueryHistoryConfiguration : Event < void > ;
93
+ onDidChangeConfiguration : Event < void > ;
94
94
}
95
95
96
96
const CLI_SETTINGS = [ NUMBER_OF_TEST_THREADS_SETTING ] ;
97
97
98
98
export interface CliConfig {
99
99
numberTestThreads : number ;
100
- onDidChangeCliConfiguration ?: Event < void > ;
100
+ onDidChangeConfiguration ?: Event < void > ;
101
101
}
102
102
103
103
@@ -128,6 +128,10 @@ abstract class ConfigListener extends DisposableObject {
128
128
private updateConfiguration ( ) : void {
129
129
this . _onDidChangeConfiguration . fire ( ) ;
130
130
}
131
+
132
+ public get onDidChangeConfiguration ( ) : Event < void > {
133
+ return this . _onDidChangeConfiguration . event ;
134
+ }
131
135
}
132
136
133
137
export class DistributionConfigListener extends ConfigListener implements DistributionConfig {
@@ -143,17 +147,13 @@ export class DistributionConfigListener extends ConfigListener implements Distri
143
147
return PERSONAL_ACCESS_TOKEN_SETTING . getValue ( ) || undefined ;
144
148
}
145
149
146
- public get onDidChangeDistributionConfiguration ( ) : Event < void > {
147
- return this . _onDidChangeConfiguration . event ;
148
- }
149
-
150
150
protected handleDidChangeConfiguration ( e : ConfigurationChangeEvent ) : void {
151
151
this . handleDidChangeConfigurationForRelevantSettings ( DISTRIBUTION_CHANGE_SETTINGS , e ) ;
152
152
}
153
153
}
154
154
155
155
export class QueryServerConfigListener extends ConfigListener implements QueryServerConfig {
156
- private constructor ( private _codeQlPath : string ) {
156
+ public constructor ( private _codeQlPath = '' ) {
157
157
super ( ) ;
158
158
}
159
159
@@ -199,10 +199,6 @@ export class QueryServerConfigListener extends ConfigListener implements QuerySe
199
199
return DEBUG_SETTING . getValue < boolean > ( ) ;
200
200
}
201
201
202
- public get onDidChangeQueryServerConfiguration ( ) : Event < void > {
203
- return this . _onDidChangeConfiguration . event ;
204
- }
205
-
206
202
protected handleDidChangeConfiguration ( e : ConfigurationChangeEvent ) : void {
207
203
this . handleDidChangeConfigurationForRelevantSettings ( QUERY_SERVER_RESTARTING_SETTINGS , e ) ;
208
204
}
@@ -213,10 +209,6 @@ export class QueryHistoryConfigListener extends ConfigListener implements QueryH
213
209
this . handleDidChangeConfigurationForRelevantSettings ( QUERY_HISTORY_SETTINGS , e ) ;
214
210
}
215
211
216
- public get onDidChangeQueryHistoryConfiguration ( ) : Event < void > {
217
- return this . _onDidChangeConfiguration . event ;
218
- }
219
-
220
212
public get format ( ) : string {
221
213
return QUERY_HISTORY_FORMAT_SETTING . getValue < string > ( ) ;
222
214
}
@@ -228,10 +220,6 @@ export class CliConfigListener extends ConfigListener implements CliConfig {
228
220
return NUMBER_OF_TEST_THREADS_SETTING . getValue ( ) ;
229
221
}
230
222
231
- public get onDidChangeCliConfiguration ( ) : Event < void > {
232
- return this . _onDidChangeConfiguration . event ;
233
- }
234
-
235
223
protected handleDidChangeConfiguration ( e : ConfigurationChangeEvent ) : void {
236
224
this . handleDidChangeConfigurationForRelevantSettings ( CLI_SETTINGS , e ) ;
237
225
}
0 commit comments