@@ -57,7 +57,7 @@ export interface DistributionConfig {
5757 personalAccessToken ?: string ;
5858 ownerName ?: string ;
5959 repositoryName ?: string ;
60- onDidChangeDistributionConfiguration ?: Event < void > ;
60+ onDidChangeConfiguration ?: Event < void > ;
6161}
6262
6363// Query server configuration
@@ -82,22 +82,22 @@ export interface QueryServerConfig {
8282 numThreads : number ;
8383 queryMemoryMb ?: number ;
8484 timeoutSecs : number ;
85- onDidChangeQueryServerConfiguration ?: Event < void > ;
85+ onDidChangeConfiguration ?: Event < void > ;
8686}
8787
8888/** When these settings change, the query history should be refreshed. */
8989const QUERY_HISTORY_SETTINGS = [ QUERY_HISTORY_FORMAT_SETTING ] ;
9090
9191export interface QueryHistoryConfig {
9292 format : string ;
93- onDidChangeQueryHistoryConfiguration : Event < void > ;
93+ onDidChangeConfiguration : Event < void > ;
9494}
9595
9696const CLI_SETTINGS = [ NUMBER_OF_TEST_THREADS_SETTING ] ;
9797
9898export interface CliConfig {
9999 numberTestThreads : number ;
100- onDidChangeCliConfiguration ?: Event < void > ;
100+ onDidChangeConfiguration ?: Event < void > ;
101101}
102102
103103
@@ -128,6 +128,10 @@ abstract class ConfigListener extends DisposableObject {
128128 private updateConfiguration ( ) : void {
129129 this . _onDidChangeConfiguration . fire ( ) ;
130130 }
131+
132+ public get onDidChangeConfiguration ( ) : Event < void > {
133+ return this . _onDidChangeConfiguration . event ;
134+ }
131135}
132136
133137export class DistributionConfigListener extends ConfigListener implements DistributionConfig {
@@ -143,17 +147,13 @@ export class DistributionConfigListener extends ConfigListener implements Distri
143147 return PERSONAL_ACCESS_TOKEN_SETTING . getValue ( ) || undefined ;
144148 }
145149
146- public get onDidChangeDistributionConfiguration ( ) : Event < void > {
147- return this . _onDidChangeConfiguration . event ;
148- }
149-
150150 protected handleDidChangeConfiguration ( e : ConfigurationChangeEvent ) : void {
151151 this . handleDidChangeConfigurationForRelevantSettings ( DISTRIBUTION_CHANGE_SETTINGS , e ) ;
152152 }
153153}
154154
155155export class QueryServerConfigListener extends ConfigListener implements QueryServerConfig {
156- private constructor ( private _codeQlPath : string ) {
156+ public constructor ( private _codeQlPath = '' ) {
157157 super ( ) ;
158158 }
159159
@@ -199,10 +199,6 @@ export class QueryServerConfigListener extends ConfigListener implements QuerySe
199199 return DEBUG_SETTING . getValue < boolean > ( ) ;
200200 }
201201
202- public get onDidChangeQueryServerConfiguration ( ) : Event < void > {
203- return this . _onDidChangeConfiguration . event ;
204- }
205-
206202 protected handleDidChangeConfiguration ( e : ConfigurationChangeEvent ) : void {
207203 this . handleDidChangeConfigurationForRelevantSettings ( QUERY_SERVER_RESTARTING_SETTINGS , e ) ;
208204 }
@@ -213,10 +209,6 @@ export class QueryHistoryConfigListener extends ConfigListener implements QueryH
213209 this . handleDidChangeConfigurationForRelevantSettings ( QUERY_HISTORY_SETTINGS , e ) ;
214210 }
215211
216- public get onDidChangeQueryHistoryConfiguration ( ) : Event < void > {
217- return this . _onDidChangeConfiguration . event ;
218- }
219-
220212 public get format ( ) : string {
221213 return QUERY_HISTORY_FORMAT_SETTING . getValue < string > ( ) ;
222214 }
@@ -228,10 +220,6 @@ export class CliConfigListener extends ConfigListener implements CliConfig {
228220 return NUMBER_OF_TEST_THREADS_SETTING . getValue ( ) ;
229221 }
230222
231- public get onDidChangeCliConfiguration ( ) : Event < void > {
232- return this . _onDidChangeConfiguration . event ;
233- }
234-
235223 protected handleDidChangeConfiguration ( e : ConfigurationChangeEvent ) : void {
236224 this . handleDidChangeConfigurationForRelevantSettings ( CLI_SETTINGS , e ) ;
237225 }
0 commit comments