diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 3c04804dafae82a1747d7460a87a90b5615e1d0f..16f71db579ac7d34bcc774f47c7d0930622dba0a 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -2951,24 +2951,52 @@ declare module 'vscode' { } /** - * Represents the workspace configuration. + * The configuration target + */ + export enum ConfigurationTarget { + /** + * Global configuration + */ + Global = 1, + + /** + * Workspace configuration + */ + Workspace = 2, + + /** + * Workspace folder configuration + */ + WorkspaceFolder = 3 + } + + /** + * Represents the configuration. It is a merged view of + * + * - Default configuration + * - Global configuration + * - Workspace configuration (if available) + * - Workspace folder configuration of the requested resource (if available) + * + * *Global configuration* comes from User Settings and shadows Defaults. * - * The workspace configuration is a merged view: Configurations of the current [workspace](#workspace.rootPath) - * (if available), files like `launch.json`, and the installation-wide configuration. Workspace specific values - * shadow installation-wide values. + * *Workspace configuration* comes from Workspace Settings and shadows Global configuration. * - * *Note:* The merged configuration of the current [workspace](#workspace.rootPath) - * also contains settings from files like `launch.json` and `tasks.json`. Their basename will be + * *Workspace Folder configuration* comes from `.vscode` folder under one of the [workspace folders](#workspace.workspaceFolders). + * + * *Note:* Workspace and Workspace Folder configurations contains `launch` and `tasks` settings. Their basename will be * part of the section identifier. The following snippets shows how to retrieve all configurations * from `launch.json`: * * ```ts * // launch.json configuration - * const config = workspace.getConfiguration('launch'); + * const config = workspace.getConfiguration('launch', vscode.window.activeTextEditor.document.uri); * * // retrieve values * const values = config.get('configurations'); * ``` + * + * Refer to [Settings](https://code.visualstudio.com/docs/getstarted/settings) for more information. */ export interface WorkspaceConfiguration { @@ -2989,7 +3017,6 @@ declare module 'vscode' { */ get(section: string, defaultValue: T): T; - /** * Check if this configuration has a certain value. * @@ -3000,10 +3027,14 @@ declare module 'vscode' { /** * Retrieve all information about a configuration setting. A configuration value - * often consists of a *default* value, a global or installation-wide value, and - * a workspace-specific value. The *effective* value (returned by [`get`](#WorkspaceConfiguration.get)) + * often consists of a *default* value, a global or installation-wide value, + * a workspace-specific value and a folder-specific value. + * + * The *effective* value (returned by [`get`](#WorkspaceConfiguration.get)) * is computed like this: `defaultValue` overwritten by `globalValue`, - * `globalValue` overwritten by `workspaceValue`. + * `globalValue` overwritten by `workspaceValue`. `workspaceValue` overwritten by `workspaceFolderValue`. + * Refer to [Settings Inheritence](https://code.visualstudio.com/docs/getstarted/settings) + * for more information. * * *Note:* The configuration name must denote a leaf in the configuration tree * (`editor.fontSize` vs `editor`) otherwise no result is returned. @@ -3011,24 +3042,33 @@ declare module 'vscode' { * @param section Configuration name, supports _dotted_ names. * @return Information about a configuration setting or `undefined`. */ - inspect(section: string): { key: string; defaultValue?: T; globalValue?: T; workspaceValue?: T } | undefined; + inspect(section: string): { key: string; defaultValue?: T; globalValue?: T; workspaceValue?: T, workspaceFolderValue?: T } | undefined; /** - * Update a configuration value. A value can be changed for the current - * [workspace](#workspace.rootPath) only, or globally for all instances of the - * editor. The updated configuration values are persisted. + * Update a configuration value. The updated configuration values are persisted. + * + * A value can be changed in * - * *Note 1:* Setting an installation-wide value (`global: true`) in the presence of - * a more specific workspace value has no observable effect in that workspace, but - * in others. + * - [Global configuration](#ConfigurationTarget.Global): Changes the value for all instances of the editor. + * - [Workspace configuration](#ConfigurationTarget.Workspace): Changes the value for current workspace, if available. + * - [Workspace folder configuration](#ConfigurationTarget.WorkspaceFolder): Changes the value for the + * [Workspace folder](#workspace.workspaceFolders) to which the current [configuration](#WorkspaceConfiguration) is scoped to. + * + * *Note 1:* Setting a global value in the presence of a more specific workspace value + * has no observable effect in that workspace, but in others. Setting a workspace value + * in the presence of a more specific folder value has no observable effect for the resources + * under respective [folder](#workspace.workspaceFolders), but in others. Refer to + * [Settings Inheritence](https://code.visualstudio.com/docs/getstarted/settings) for more information. * * *Note 2:* To remove a configuration value use `undefined`, like so: `config.update('somekey', undefined)` * * @param section Configuration name, supports _dotted_ names. * @param value The new value. - * @param global When `true` changes the configuration value for all instances of the editor. + * @param configurationTarget The [configuration target](#ConfigurationTarget) or a boolean value. + * If `undefined` or `null` or `false` configuration target is `ConfigurationTarget.Workspace`. + * If `true` configuration target is `ConfigurationTarget.Global`. */ - update(section: string, value: any, global?: boolean): Thenable; + update(section: string, value: any, configurationTarget?: ConfigurationTarget | boolean): Thenable; /** * Readable dictionary that backs this configuration. @@ -4849,16 +4889,19 @@ declare module 'vscode' { export const onDidSaveTextDocument: Event; /** - * Get a configuration object. + * Get a workspace configuration object. * * When a section-identifier is provided only that part of the configuration * is returned. Dots in the section-identifier are interpreted as child-access, * like `{ myExt: { setting: { doIt: true }}}` and `getConfiguration('myExt.setting').get('doIt') === true`. * + * When a resource is provided, configuration scoped to that resource is returned. + * * @param section A dot-separated identifier. - * @return The full workspace configuration or a subset. + * @param resource A resource for which the configuration is asked for + * @return The full configuration or a subset. */ - export function getConfiguration(section?: string): WorkspaceConfiguration; + export function getConfiguration(section?: string, resource?: Uri): WorkspaceConfiguration; /** * An event that is emitted when the [configuration](#WorkspaceConfiguration) changed. diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 79c14ff35e97977450b03fb168e4824c9f8a9bfe..8dd39d6f190d932d644f321e4e43e1558e3c71f0 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -7,12 +7,6 @@ declare module 'vscode' { - export interface WorkspaceConfiguration2 extends WorkspaceConfiguration { - - inspect(section: string): { key: string; defaultValue?: T; globalValue?: T; workspaceValue?: T, folderValue?: T } | undefined; - - } - // todo@joh discover files etc export interface FileSystemProvider { // todo@joh -> added, deleted, renamed, changed @@ -25,79 +19,6 @@ declare module 'vscode' { export namespace workspace { export function registerFileSystemProvider(authority: string, provider: FileSystemProvider): Disposable; - - /** - * Get a configuration object. - * - * When a section-identifier is provided only that part of the configuration - * is returned. Dots in the section-identifier are interpreted as child-access, - * like `{ myExt: { setting: { doIt: true }}}` and `getConfiguration('myExt.setting').get('doIt') === true`. - * - * When a resource is provided, only configuration scoped to that resource - * is returned. - * - * If editor is opened with `no folders` then returns the global configuration. - * - * If editor is opened with `folders` then returns the configuration from the folder in which the resource belongs to. - * - * If resource does not belongs to any opened folders, then returns the workspace configuration. - * - * @param section A dot-separated identifier. - * @param resource A resource for which configuration is asked - * @return The full workspace configuration or a subset. - */ - export function getConfiguration2(section?: string, resource?: Uri): WorkspaceConfiguration2; - } - - /** - * Represents the workspace configuration. - * - * The workspace configuration is a merged view of - * - * - Default configuration - * - Global configuration - * - Workspace configuration (if available) - * - Folder configuration of the [resource](#workspace.getConfiguration2) (if requested and available) - * - * **Global configuration** comes from User Settings and shadows Defaults. - * - * **Workspace configuration** comes from the `.vscode` folder under first [workspace folders](#workspace.workspaceFolders) - * and shadows Globals configuration. - * - * **Folder configurations** comes from `.vscode` folder under [workspace folders](#workspace.workspaceFolders). Each [workspace folder](#workspace.workspaceFolders) - * has a configuration and the requested resource determines which folder configuration to pick. Folder configuration shodows Workspace configuration. - * - * *Note:* Workspace and Folder configurations contains settings from `launch.json` and `tasks.json` files. Their basename will be - * part of the section identifier. The following snippets shows how to retrieve all configurations - * from `launch.json`: - * - * ```ts - * // launch.json configuration - * const config = workspace.getConfiguration('launch', workspace.workspaceFolders[1]); - * - * // retrieve values - * const values = config.get('configurations'); - * ``` - */ - export interface WorkspaceConfiguration2 extends WorkspaceConfiguration { - - /** - * Retrieve all information about a configuration setting. A configuration value - * often consists of a *default* value, a global or installation-wide value, - * a workspace-specific value and a folder-specific value. - * - * The *effective* value (returned by [`get`](#WorkspaceConfiguration.get)) - * is computed like this: `defaultValue` overwritten by `globalValue`, - * `globalValue` overwritten by `workspaceValue`. `workspaceValue` overwritten by `folderValue`. - * - * *Note:* The configuration name must denote a leaf in the configuration tree - * (`editor.fontSize` vs `editor`) otherwise no result is returned. - * - * @param section Configuration name, supports _dotted_ names. - * @return Information about a configuration setting or `undefined`. - */ - inspect(section: string): { key: string; defaultValue?: T; globalValue?: T; workspaceValue?: T, folderValue?: T } | undefined; - } export namespace window { diff --git a/src/vs/workbench/api/electron-browser/mainThreadConfiguration.ts b/src/vs/workbench/api/electron-browser/mainThreadConfiguration.ts index b08d8877d07abcfa65cc6a273ad2768f1bb34303..6d3b48ea2bfa928b62ac45b4dc7d00fb30fcf9f7 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadConfiguration.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadConfiguration.ts @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; +import URI from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; @@ -34,11 +35,11 @@ export class MainThreadConfiguration extends MainThreadConfigurationShape { this._toDispose = dispose(this._toDispose); } - $updateConfigurationOption(target: ConfigurationTarget, key: string, value: any): TPromise { - return this._configurationEditingService.writeConfiguration(target, { key, value }, { donotNotifyError: true }); + $updateConfigurationOption(target: ConfigurationTarget, key: string, value: any, resource: URI): TPromise { + return this._configurationEditingService.writeConfiguration(target, { key, value }, { donotNotifyError: true, scopes: { resource } }); } - $removeConfigurationOption(target: ConfigurationTarget, key: string): TPromise { - return this._configurationEditingService.writeConfiguration(target, { key, value: undefined }, { donotNotifyError: true }); + $removeConfigurationOption(target: ConfigurationTarget, key: string, resource: URI): TPromise { + return this._configurationEditingService.writeConfiguration(target, { key, value: undefined }, { donotNotifyError: true, scopes: { resource } }); } } diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index 8a2987fdf694ab504e7405e6d6843c0ed575cb7b..d67938243a101d00ffb18f3b942c5052cd548ef2 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -445,12 +445,9 @@ export function createApiFactory( onDidChangeConfiguration: (listener: (_: any) => any, thisArgs?: any, disposables?: extHostTypes.Disposable[]) => { return extHostConfiguration.onDidChangeConfiguration(listener, thisArgs, disposables); }, - getConfiguration: (section?: string): vscode.WorkspaceConfiguration => { - return extHostConfiguration.getConfiguration(section); + getConfiguration: (section?: string, resource?: vscode.Uri): vscode.WorkspaceConfiguration => { + return extHostConfiguration.getConfiguration(section, resource); }, - getConfiguration2: proposedApiFunction(extension, (section?: string, resource?: vscode.Uri): vscode.WorkspaceConfiguration => { - return extHostConfiguration.getConfiguration2(section, resource); - }), registerTaskProvider: (type: string, provider: vscode.TaskProvider) => { return extHostTask.registerTaskProvider(extension, provider); }, @@ -578,7 +575,8 @@ export function createApiFactory( TaskGroup: extHostTypes.TaskGroup, ProcessExecution: extHostTypes.ProcessExecution, ShellExecution: extHostTypes.ShellExecution, - Task: extHostTypes.Task + Task: extHostTypes.Task, + ConfigurationTarget: extHostTypes.ConfigurationTarget }; }; } diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 19e2b61963c1a6039ad3d0a265bccc1eaaa42b84..f9b11ee296fd18c1eade785109fb01b0c3ee406f 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -123,8 +123,8 @@ export abstract class MainThreadCommandsShape { } export abstract class MainThreadConfigurationShape { - $updateConfigurationOption(target: ConfigurationTarget, key: string, value: any): TPromise { throw ni(); } - $removeConfigurationOption(target: ConfigurationTarget, key: string): TPromise { throw ni(); } + $updateConfigurationOption(target: ConfigurationTarget, key: string, value: any, resource: URI): TPromise { throw ni(); } + $removeConfigurationOption(target: ConfigurationTarget, key: string, resource: URI): TPromise { throw ni(); } } export abstract class MainThreadDiagnosticsShape { diff --git a/src/vs/workbench/api/node/extHostConfiguration.ts b/src/vs/workbench/api/node/extHostConfiguration.ts index b900063a3788428ee3d7180c5279d16f114d91da..9cb6406ce2d60370b8e53dfd6ccb8f09f6db816e 100644 --- a/src/vs/workbench/api/node/extHostConfiguration.ts +++ b/src/vs/workbench/api/node/extHostConfiguration.ts @@ -7,9 +7,10 @@ import { mixin } from 'vs/base/common/objects'; import URI from 'vs/base/common/uri'; import Event, { Emitter } from 'vs/base/common/event'; -import { WorkspaceConfiguration, WorkspaceConfiguration2 } from 'vscode'; +import { WorkspaceConfiguration } from 'vscode'; import { ExtHostWorkspace } from 'vs/workbench/api/node/extHostWorkspace'; import { ExtHostConfigurationShape, MainThreadConfigurationShape } from './extHost.protocol'; +import { ConfigurationTarget as ExtHostConfigurationTarget } from './extHostTypes'; import { IConfigurationData, Configuration } from 'vs/platform/configuration/common/configuration'; import { ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; @@ -29,7 +30,7 @@ type ConfigurationInspect = { defaultValue?: T; globalValue?: T; workspaceValue?: T; - folderValue?: T; + workspaceFolderValue?: T; }; export class ExtHostConfiguration extends ExtHostConfigurationShape { @@ -55,20 +56,26 @@ export class ExtHostConfiguration extends ExtHostConfigurationShape { this._onDidChangeConfiguration.fire(undefined); } - getConfiguration(section?: string): WorkspaceConfiguration { - return this._getConfiguration(section, null, true); - } - - getConfiguration2(section?: string, resource?: URI): WorkspaceConfiguration2 { - return this._getConfiguration(section, resource, false); - } - - private _getConfiguration(section: string, resource: URI, legacy: boolean): WorkspaceConfiguration { - + getConfiguration(section?: string, resource?: URI): WorkspaceConfiguration { const config = section ? lookUp(this._configuration.getValue(null, { resource }), section) : this._configuration.getValue(null, { resource }); + function parseConfigurationTarget(arg: boolean | ExtHostConfigurationTarget): ConfigurationTarget { + if (arg === void 0 || arg === null) { + return ConfigurationTarget.WORKSPACE; + } + if (typeof arg === 'boolean') { + return arg ? ConfigurationTarget.USER : ConfigurationTarget.WORKSPACE; + } + + switch (arg) { + case ExtHostConfigurationTarget.Global: return ConfigurationTarget.USER; + case ExtHostConfigurationTarget.Workspace: return ConfigurationTarget.WORKSPACE; + case ExtHostConfigurationTarget.WorkspaceFolder: return ConfigurationTarget.FOLDER; + } + } + const result: WorkspaceConfiguration = { has(key: string): boolean { return typeof lookUp(config, key) !== 'undefined'; @@ -80,29 +87,26 @@ export class ExtHostConfiguration extends ExtHostConfigurationShape { } return result; }, - update: (key: string, value: any, global: boolean = false) => { + update: (key: string, value: any, arg: ExtHostConfigurationTarget | boolean) => { key = section ? `${section}.${key}` : key; - const target = global ? ConfigurationTarget.USER : ConfigurationTarget.WORKSPACE; + const target = parseConfigurationTarget(arg); if (value !== void 0) { - return this._proxy.$updateConfigurationOption(target, key, value); + return this._proxy.$updateConfigurationOption(target, key, value, resource); } else { - return this._proxy.$removeConfigurationOption(target, key); + return this._proxy.$removeConfigurationOption(target, key, resource); } }, inspect: (key: string): ConfigurationInspect => { key = section ? `${section}.${key}` : key; - const config = legacy ? this._configuration.lookupLegacy(key) : this._configuration.lookup(key, { resource }); + const config = this._configuration.lookup(key, { resource }); if (config) { - const inspect: ConfigurationInspect = { + return { key, defaultValue: config.default, globalValue: config.user, workspaceValue: config.workspace, + workspaceFolderValue: config.folder }; - if (!legacy) { - inspect.folderValue = config.folder; - } - return inspect; } return undefined; } diff --git a/src/vs/workbench/api/node/extHostTypes.ts b/src/vs/workbench/api/node/extHostTypes.ts index 790d0df89ba8630ded97e2087ce4f2e394598709..ab6e6d59b32b299458bf5b1692574ac88fc5745b 100644 --- a/src/vs/workbench/api/node/extHostTypes.ts +++ b/src/vs/workbench/api/node/extHostTypes.ts @@ -1316,3 +1316,11 @@ export class ThemeColor { this.id = id; } } + +export enum ConfigurationTarget { + Global = 1, + + Workspace = 2, + + WorkspaceFolder = 3 +} \ No newline at end of file diff --git a/src/vs/workbench/test/electron-browser/api/extHostConfiguration.test.ts b/src/vs/workbench/test/electron-browser/api/extHostConfiguration.test.ts index 7a70b22c8449a898550dbe97037b7ee789d2310e..685780482158cb74c68a74ea12280a1955ce7802 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostConfiguration.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostConfiguration.test.ts @@ -108,13 +108,13 @@ suite('ExtHostConfiguration', function () { assert.equal(actual.defaultValue, 'off'); assert.equal(actual.globalValue, 'on'); assert.equal(actual.workspaceValue, undefined); - assert.ok(Object.keys(actual).indexOf('folderValue') === -1); + assert.equal(actual.workspaceFolderValue, undefined); actual = testObject.getConfiguration('editor').inspect('wordWrap'); assert.equal(actual.defaultValue, 'off'); assert.equal(actual.globalValue, 'on'); assert.equal(actual.workspaceValue, undefined); - assert.ok(Object.keys(actual).indexOf('folderValue') === -1); + assert.equal(actual.workspaceFolderValue, undefined); }); test('inspect in single root context', function () { @@ -153,25 +153,25 @@ suite('ExtHostConfiguration', function () { assert.equal(actual1.defaultValue, 'off'); assert.equal(actual1.globalValue, 'on'); assert.equal(actual1.workspaceValue, 'bounded'); - assert.ok(Object.keys(actual1).indexOf('folderValue') === -1); + assert.equal(actual1.workspaceFolderValue, undefined); actual1 = testObject.getConfiguration('editor').inspect('wordWrap'); assert.equal(actual1.defaultValue, 'off'); assert.equal(actual1.globalValue, 'on'); assert.equal(actual1.workspaceValue, 'bounded'); - assert.ok(Object.keys(actual1).indexOf('folderValue') === -1); + assert.equal(actual1.workspaceFolderValue, undefined); - let actual2 = testObject.getConfiguration2(null, workspaceUri).inspect('editor.wordWrap'); + let actual2 = testObject.getConfiguration(null, workspaceUri).inspect('editor.wordWrap'); assert.equal(actual2.defaultValue, 'off'); assert.equal(actual2.globalValue, 'on'); assert.equal(actual2.workspaceValue, 'bounded'); - assert.equal(actual2.folderValue, 'bounded'); + assert.equal(actual2.workspaceFolderValue, 'bounded'); - actual2 = testObject.getConfiguration2('editor', workspaceUri).inspect('wordWrap'); + actual2 = testObject.getConfiguration('editor', workspaceUri).inspect('wordWrap'); assert.equal(actual2.defaultValue, 'off'); assert.equal(actual2.globalValue, 'on'); assert.equal(actual2.workspaceValue, 'bounded'); - assert.equal(actual2.folderValue, 'bounded'); + assert.equal(actual2.workspaceFolderValue, 'bounded'); }); test('inspect in multi root context', function () { @@ -225,64 +225,64 @@ suite('ExtHostConfiguration', function () { let actual1 = testObject.getConfiguration().inspect('editor.wordWrap'); assert.equal(actual1.defaultValue, 'off'); assert.equal(actual1.globalValue, 'on'); - assert.equal(actual1.workspaceValue, 'off'); - assert.ok(Object.keys(actual1).indexOf('folderValue') === -1); + assert.equal(actual1.workspaceValue, 'bounded'); + assert.equal(actual1.workspaceFolderValue, undefined); actual1 = testObject.getConfiguration('editor').inspect('wordWrap'); assert.equal(actual1.defaultValue, 'off'); assert.equal(actual1.globalValue, 'on'); - assert.equal(actual1.workspaceValue, 'off'); - assert.ok(Object.keys(actual1).indexOf('folderValue') === -1); + assert.equal(actual1.workspaceValue, 'bounded'); + assert.equal(actual1.workspaceFolderValue, undefined); actual1 = testObject.getConfiguration('editor').inspect('lineNumbers'); assert.equal(actual1.defaultValue, 'on'); assert.equal(actual1.globalValue, undefined); - assert.equal(actual1.workspaceValue, 'relative'); - assert.ok(Object.keys(actual1).indexOf('folderValue') === -1); + assert.equal(actual1.workspaceValue, undefined); + assert.equal(actual1.workspaceFolderValue, undefined); - let actual2 = testObject.getConfiguration2(null, firstRoot).inspect('editor.wordWrap'); + let actual2 = testObject.getConfiguration(null, firstRoot).inspect('editor.wordWrap'); assert.equal(actual2.defaultValue, 'off'); assert.equal(actual2.globalValue, 'on'); assert.equal(actual2.workspaceValue, 'bounded'); - assert.equal(actual2.folderValue, 'off'); + assert.equal(actual2.workspaceFolderValue, 'off'); - actual2 = testObject.getConfiguration2('editor', firstRoot).inspect('wordWrap'); + actual2 = testObject.getConfiguration('editor', firstRoot).inspect('wordWrap'); assert.equal(actual2.defaultValue, 'off'); assert.equal(actual2.globalValue, 'on'); assert.equal(actual2.workspaceValue, 'bounded'); - assert.equal(actual2.folderValue, 'off'); + assert.equal(actual2.workspaceFolderValue, 'off'); - actual2 = testObject.getConfiguration2('editor', firstRoot).inspect('lineNumbers'); + actual2 = testObject.getConfiguration('editor', firstRoot).inspect('lineNumbers'); assert.equal(actual2.defaultValue, 'on'); assert.equal(actual2.globalValue, undefined); assert.equal(actual2.workspaceValue, undefined); - assert.equal(actual2.folderValue, 'relative'); + assert.equal(actual2.workspaceFolderValue, 'relative'); - actual2 = testObject.getConfiguration2(null, secondRoot).inspect('editor.wordWrap'); + actual2 = testObject.getConfiguration(null, secondRoot).inspect('editor.wordWrap'); assert.equal(actual2.defaultValue, 'off'); assert.equal(actual2.globalValue, 'on'); assert.equal(actual2.workspaceValue, 'bounded'); - assert.equal(actual2.folderValue, 'on'); + assert.equal(actual2.workspaceFolderValue, 'on'); - actual2 = testObject.getConfiguration2('editor', secondRoot).inspect('wordWrap'); + actual2 = testObject.getConfiguration('editor', secondRoot).inspect('wordWrap'); assert.equal(actual2.defaultValue, 'off'); assert.equal(actual2.globalValue, 'on'); assert.equal(actual2.workspaceValue, 'bounded'); - assert.equal(actual2.folderValue, 'on'); + assert.equal(actual2.workspaceFolderValue, 'on'); - actual2 = testObject.getConfiguration2(null, thirdRoot).inspect('editor.wordWrap'); + actual2 = testObject.getConfiguration(null, thirdRoot).inspect('editor.wordWrap'); assert.equal(actual2.defaultValue, 'off'); assert.equal(actual2.globalValue, 'on'); assert.equal(actual2.workspaceValue, 'bounded'); - assert.ok(Object.keys(actual2).indexOf('folderValue') !== -1); - assert.equal(actual2.folderValue, undefined); + assert.ok(Object.keys(actual2).indexOf('workspaceFolderValue') !== -1); + assert.equal(actual2.workspaceFolderValue, undefined); - actual2 = testObject.getConfiguration2('editor', thirdRoot).inspect('wordWrap'); + actual2 = testObject.getConfiguration('editor', thirdRoot).inspect('wordWrap'); assert.equal(actual2.defaultValue, 'off'); assert.equal(actual2.globalValue, 'on'); assert.equal(actual2.workspaceValue, 'bounded'); - assert.ok(Object.keys(actual2).indexOf('folderValue') !== -1); - assert.equal(actual2.folderValue, undefined); + assert.ok(Object.keys(actual2).indexOf('workspaceFolderValue') !== -1); + assert.equal(actual2.workspaceFolderValue, undefined); }); test('getConfiguration vs get', function () {