diff --git a/src/vs/editor/standalone/browser/simpleServices.ts b/src/vs/editor/standalone/browser/simpleServices.ts index 3d84c45b5eb..91440df58d0 100644 --- a/src/vs/editor/standalone/browser/simpleServices.ts +++ b/src/vs/editor/standalone/browser/simpleServices.ts @@ -459,11 +459,11 @@ export class SimpleConfigurationService implements IConfigurationService { getConfiguration(arg1?: any, arg2?: any): any { const section = typeof arg1 === 'string' ? arg1 : void 0; const overrides = isConfigurationOverrides(arg1) ? arg1 : isConfigurationOverrides(arg2) ? arg2 : void 0; - return this.configuration().getValue(section, overrides); + return this.configuration().getSection(section, overrides); } public getValue(key: string, options?: IConfigurationOverrides): C { - return this.configuration().getValue2(key, options); + return this.configuration().getValue(key, options); } public updateValue(key: string, value: any, arg3?: any, arg4?: any): TPromise { diff --git a/src/vs/platform/configuration/common/configurationModels.ts b/src/vs/platform/configuration/common/configurationModels.ts index 428b3a499a9..a469c8d7571 100644 --- a/src/vs/platform/configuration/common/configurationModels.ts +++ b/src/vs/platform/configuration/common/configurationModels.ts @@ -260,12 +260,12 @@ export class Configuration { this._foldersConsolidatedConfigurations.set(folder, this._workspaceConsolidatedConfiguration.merge(this.folders.get(folder))); } - getValue(section: string = '', overrides: IConfigurationOverrides = {}): C { + getSection(section: string = '', overrides: IConfigurationOverrides = {}): C { const configModel = this.getConsolidateConfigurationModel(overrides); return section ? configModel.getContentsFor(section) : configModel.contents; } - getValue2(key: string, overrides: IConfigurationOverrides = {}): any { + getValue(key: string, overrides: IConfigurationOverrides = {}): any { // make sure to clone the configuration so that the receiver does not tamper with the values const consolidateConfigurationModel = this.getConsolidateConfigurationModel(overrides); return objects.clone(getConfigurationValue(consolidateConfigurationModel.contents, key)); diff --git a/src/vs/platform/configuration/node/configurationService.ts b/src/vs/platform/configuration/node/configurationService.ts index d7b5f65f730..893af01e558 100644 --- a/src/vs/platform/configuration/node/configurationService.ts +++ b/src/vs/platform/configuration/node/configurationService.ts @@ -67,11 +67,11 @@ export class ConfigurationService extends Disposable implements IConfigurationSe getConfiguration(arg1?: any, arg2?: any): any { const section = typeof arg1 === 'string' ? arg1 : void 0; const overrides = isConfigurationOverrides(arg1) ? arg1 : isConfigurationOverrides(arg2) ? arg2 : void 0; - return this.configuration.getValue(section, overrides); + return this.configuration.getSection(section, overrides); } getValue(key: string, overrides: IConfigurationOverrides): any { - return this.configuration.getValue2(key, overrides); + return this.configuration.getValue(key, overrides); } updateValue(key: string, value: any): TPromise @@ -113,7 +113,7 @@ export class ConfigurationService extends Disposable implements IConfigurationSe if (changedKeys.length) { const oldConfiguartion = this._configuration; this.reset(); - changedKeys = changedKeys.filter(key => !equals(oldConfiguartion.getValue2(key), this._configuration.getValue2(key))); + changedKeys = changedKeys.filter(key => !equals(oldConfiguartion.getValue(key), this._configuration.getValue(key))); if (changedKeys.length) { this.trigger(changedKeys, ConfigurationTarget.USER); } diff --git a/src/vs/workbench/api/node/extHostConfiguration.ts b/src/vs/workbench/api/node/extHostConfiguration.ts index 031763f0ff4..6d3aee7186e 100644 --- a/src/vs/workbench/api/node/extHostConfiguration.ts +++ b/src/vs/workbench/api/node/extHostConfiguration.ts @@ -58,8 +58,8 @@ export class ExtHostConfiguration implements ExtHostConfigurationShape { getConfiguration(section?: string, resource?: URI): WorkspaceConfiguration { const config = section - ? lookUp(this._configuration.getValue(null, { resource }), section) - : this._configuration.getValue(null, { resource }); + ? lookUp(this._configuration.getSection(null, { resource }), section) + : this._configuration.getSection(null, { resource }); function parseConfigurationTarget(arg: boolean | ExtHostConfigurationTarget): ConfigurationTarget { if (arg === void 0 || arg === null) { diff --git a/src/vs/workbench/services/configuration/common/configurationModels.ts b/src/vs/workbench/services/configuration/common/configurationModels.ts index df0c1b196ee..1223ae638a7 100644 --- a/src/vs/workbench/services/configuration/common/configurationModels.ts +++ b/src/vs/workbench/services/configuration/common/configurationModels.ts @@ -211,7 +211,7 @@ export class Configuration extends BaseConfiguration { this._user = user; this.merge(); - changedKeys = changedKeys.filter(key => !equals(oldConfiguartion.getValue2(key), this.getValue2(key))); + changedKeys = changedKeys.filter(key => !equals(oldConfiguartion.getValue(key), this.getValue(key))); return changedKeys; } return []; @@ -227,7 +227,7 @@ export class Configuration extends BaseConfiguration { this._workspaceConfiguration = workspaceConfiguration; this.merge(); - changedKeys = changedKeys.filter(key => !equals(oldConfiguartion.getValue2(key), this.getValue2(key))); + changedKeys = changedKeys.filter(key => !equals(oldConfiguartion.getValue(key), this.getValue(key))); return changedKeys; } return []; @@ -246,7 +246,7 @@ export class Configuration extends BaseConfiguration { this.folders.set(resource, configuration); this.mergeFolder(resource); - changedKeys = changedKeys.filter(key => !equals(oldConfiguartion.getValue2(key, { resource }), this.getValue2(key, { resource }))); + changedKeys = changedKeys.filter(key => !equals(oldConfiguartion.getValue(key, { resource }), this.getValue(key, { resource }))); return changedKeys; } return []; diff --git a/src/vs/workbench/services/configuration/node/configurationService.ts b/src/vs/workbench/services/configuration/node/configurationService.ts index 7e8884d88e7..9a1c04fb4be 100644 --- a/src/vs/workbench/services/configuration/node/configurationService.ts +++ b/src/vs/workbench/services/configuration/node/configurationService.ts @@ -135,13 +135,13 @@ export class WorkspaceService extends Disposable implements IWorkspaceConfigurat getConfiguration(arg1?: any, arg2?: any): any { const section = typeof arg1 === 'string' ? arg1 : void 0; const overrides = isConfigurationOverrides(arg1) ? arg1 : isConfigurationOverrides(arg2) ? arg2 : void 0; - const contents = this._configuration.getValue(section, overrides); + const contents = this._configuration.getSection(section, overrides); return typeof contents === 'object' ? { toJSON: () => this._configuration.toData(), ...contents } : contents; } getValue(key: string, overrides?: IConfigurationOverrides): T { - return this._configuration.getValue2(key, overrides); + return this._configuration.getValue(key, overrides); } updateValue(key: string, value: any): TPromise