Skip to content

Commit b0a7b57

Browse files
committed
Rename IConfigurationService onDidUpdateConfiguration to onDidChangeConfiguration
1 parent 7d3ee8a commit b0a7b57

62 files changed

Lines changed: 84 additions & 83 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/vs/code/electron-main/menus.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export class CodeMenu {
136136
});
137137

138138
// Update when auto save config changes
139-
this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationUpdated(this.configurationService.getConfiguration<IConfiguration>(), true /* update menu if changed */));
139+
this.configurationService.onDidChangeConfiguration(e => this.onConfigurationUpdated(this.configurationService.getConfiguration<IConfiguration>(), true /* update menu if changed */));
140140

141141
// Listen to update service
142142
this.updateService.onStateChange(() => this.updateMenu());

src/vs/code/electron-main/window.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ export class CodeWindow implements ICodeWindow {
409409
}
410410

411411
// Handle configuration changes
412-
this.toDispose.push(this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationUpdated()));
412+
this.toDispose.push(this.configurationService.onDidChangeConfiguration(e => this.onConfigurationUpdated()));
413413

414414
// Handle Workspace events
415415
this.toDispose.push(this.workspaceService.onUntitledWorkspaceDeleted(e => this.onUntitledWorkspaceDeleted(e)));

src/vs/editor/common/services/modelServiceImpl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ export class ModelServiceImpl implements IModelService {
224224
this._markerServiceSubscription = this._markerService.onMarkerChanged(this._handleMarkerChange, this);
225225
}
226226

227-
this._configurationServiceSubscription = this._configurationService.onDidUpdateConfiguration(e => this._updateModelOptions());
227+
this._configurationServiceSubscription = this._configurationService.onDidChangeConfiguration(e => this._updateModelOptions());
228228
this._updateModelOptions();
229229
}
230230

src/vs/editor/common/services/resourceConfiguration.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import Event from 'vs/base/common/event';
77
import URI from 'vs/base/common/uri';
88
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
99
import { IPosition } from 'vs/editor/common/core/position';
10+
import { IConfigurationChangeEvent } from 'vs/platform/configuration/common/configuration';
1011

1112
export const ITextResourceConfigurationService = createDecorator<ITextResourceConfigurationService>('textResourceConfigurationService');
1213

@@ -17,7 +18,7 @@ export interface ITextResourceConfigurationService {
1718
/**
1819
* Event that fires when the configuration changes.
1920
*/
20-
onDidUpdateConfiguration: Event<void>;
21+
onDidChangeConfiguration: Event<IConfigurationChangeEvent>;
2122

2223
/**
2324
* Fetches the appropriate section of the for the given resource with appropriate overrides (e.g. language).

src/vs/editor/common/services/resourceConfigurationImpl.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import Event, { Emitter } from 'vs/base/common/event';
77
import { Disposable } from 'vs/base/common/lifecycle';
88
import URI from 'vs/base/common/uri';
9-
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
9+
import { IConfigurationService, IConfigurationChangeEvent } from 'vs/platform/configuration/common/configuration';
1010
import { ITextResourceConfigurationService } from 'vs/editor/common/services/resourceConfiguration';
1111
import { IPosition, Position } from 'vs/editor/common/core/position';
1212
import { IModeService } from 'vs/editor/common/services/modeService';
@@ -16,16 +16,16 @@ export class TextResourceConfigurationService extends Disposable implements ITex
1616

1717
public _serviceBrand: any;
1818

19-
private readonly _onDidUpdateConfiguration: Emitter<void> = this._register(new Emitter<void>());
20-
public readonly onDidUpdateConfiguration: Event<void> = this._onDidUpdateConfiguration.event;
19+
private readonly _onDidChangeConfiguration: Emitter<IConfigurationChangeEvent> = this._register(new Emitter<IConfigurationChangeEvent>());
20+
public readonly onDidChangeConfiguration: Event<IConfigurationChangeEvent> = this._onDidChangeConfiguration.event;
2121

2222
constructor(
2323
@IConfigurationService private configurationService: IConfigurationService,
2424
@IModelService private modelService: IModelService,
2525
@IModeService private modeService: IModeService,
2626
) {
2727
super();
28-
this._register(this.configurationService.onDidUpdateConfiguration(() => this._onDidUpdateConfiguration.fire()));
28+
this._register(this.configurationService.onDidChangeConfiguration(e => this._onDidChangeConfiguration.fire(e)));
2929
}
3030

3131
getConfiguration<T>(resource: URI, section?: string): T

src/vs/editor/standalone/browser/simpleServices.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -445,8 +445,8 @@ export class SimpleConfigurationService implements IConfigurationService {
445445

446446
_serviceBrand: any;
447447

448-
private _onDidUpdateConfiguration = new Emitter<IConfigurationChangeEvent>();
449-
public onDidUpdateConfiguration: Event<IConfigurationChangeEvent> = this._onDidUpdateConfiguration.event;
448+
private _onDidChangeConfiguration = new Emitter<IConfigurationChangeEvent>();
449+
public onDidChangeConfiguration: Event<IConfigurationChangeEvent> = this._onDidChangeConfiguration.event;
450450

451451
private _configuration: Configuration;
452452

@@ -503,12 +503,12 @@ export class SimpleResourceConfigurationService implements ITextResourceConfigur
503503

504504
_serviceBrand: any;
505505

506-
public readonly onDidUpdateConfiguration: Event<void>;
507-
private readonly _onDidUpdateConfigurationEmitter = new Emitter();
506+
public readonly onDidChangeConfiguration: Event<IConfigurationChangeEvent>;
507+
private readonly _onDidChangeConfigurationEmitter = new Emitter();
508508

509509
constructor(private configurationService: SimpleConfigurationService) {
510-
this.configurationService.onDidUpdateConfiguration(() => {
511-
this._onDidUpdateConfigurationEmitter.fire();
510+
this.configurationService.onDidChangeConfiguration((e) => {
511+
this._onDidChangeConfigurationEmitter.fire(e);
512512
});
513513
}
514514

src/vs/platform/configuration/common/configuration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export interface IConfigurationChangeEvent {
4848
export interface IConfigurationService {
4949
_serviceBrand: any;
5050

51-
onDidUpdateConfiguration: Event<IConfigurationChangeEvent>;
51+
onDidChangeConfiguration: Event<IConfigurationChangeEvent>;
5252

5353
getConfigurationData(): IConfigurationData;
5454

src/vs/platform/configuration/node/configurationService.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ export class ConfigurationService extends Disposable implements IConfigurationSe
2424
private _configuration: Configuration;
2525
private userConfigModelWatcher: ConfigWatcher<ConfigurationModel>;
2626

27-
private _onDidUpdateConfiguration: Emitter<IConfigurationChangeEvent> = this._register(new Emitter<IConfigurationChangeEvent>());
28-
readonly onDidUpdateConfiguration: Event<IConfigurationChangeEvent> = this._onDidUpdateConfiguration.event;
27+
private _onDidChangeConfiguration: Emitter<IConfigurationChangeEvent> = this._register(new Emitter<IConfigurationChangeEvent>());
28+
readonly onDidChangeConfiguration: Event<IConfigurationChangeEvent> = this._onDidChangeConfiguration.event;
2929

3030
constructor(
3131
@IEnvironmentService environmentService: IEnvironmentService
@@ -128,7 +128,7 @@ export class ConfigurationService extends Disposable implements IConfigurationSe
128128
}
129129

130130
private trigger(keys: string[], source: ConfigurationTarget): void {
131-
this._onDidUpdateConfiguration.fire(new ConfigurationChangeEvent().change(keys).telemetryData(source, this.getTargetConfiguration(source)));
131+
this._onDidChangeConfiguration.fire(new ConfigurationChangeEvent().change(keys).telemetryData(source, this.getTargetConfiguration(source)));
132132
}
133133

134134
private getTargetConfiguration(target: ConfigurationTarget): any {

src/vs/platform/configuration/test/common/testConfigurationService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export class TestConfigurationService extends EventEmitter implements IConfigura
5252
return TPromise.as(null);
5353
}
5454

55-
public onDidUpdateConfiguration() {
55+
public onDidChangeConfiguration() {
5656
return { dispose() { } };
5757
}
5858

src/vs/platform/contextkey/browser/contextKeyService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class ConfigAwareContextValuesContainer extends Context {
5858
super(id, null);
5959

6060
this._emitter = emitter;
61-
this._subscription = configurationService.onDidUpdateConfiguration(e => this._updateConfigurationContext(configurationService.getConfiguration()));
61+
this._subscription = configurationService.onDidChangeConfiguration(e => this._updateConfigurationContext(configurationService.getConfiguration()));
6262
this._updateConfigurationContext(configurationService.getConfiguration());
6363
}
6464

0 commit comments

Comments
 (0)