// mixture of both files under platform and workbench export const enum ConfigurationScope { /** * Application specific configuration, which can be configured only in local user settings. */ APPLICATION = 1, /** * Machine specific configuration, which can be configured only in local and remote user settings. */ MACHINE, /** * Window specific configuration, which can be configured in the user or workspace settings. */ WINDOW, /** * Resource specific configuration, which can be configured in the user, workspace or folder settings. */ RESOURCE, /** * Resource specific configuration that can be configured */ RESOURCE_OVERRIDABLE, /** * Machine specific conifugration that can also be configured */ MACHINE_OVERRIDABLE, } // export interface IConfigurationOverrides { // overrideIdentifier?: string; // resource?: URI; // } export const enum ConfigurationTarget { /** * Targets the user configuration file for writing. */ USER = 1, USER_LOCAL, USER_REMOTE, /** * Targets the workspace configuration file for writing. This only works if a workspace is opened. */ WORKSPACE, /** * Targets the folder configuration file for writing. This only works if a workspace is opened. */ WORKSPACE_FOLDER, DEFAULT, MEMORY, } // export interface IConfigurationModel { // contents: any; // keys: string[]; // overrides: IOverrides[]; // } // export interface IOverrides { // contents: any; // identifiers: string[]; // } // export interface IConfigurationData extends IIConfigurationData { // defaults: IConfigurationModel; // user: IConfigurationModel; // workspace: IConfigurationModel; // folders: { [folder: string]: IConfigurationModel } | IFolderConfigurationModel[]; // isComplete: boolean; // } // src/vs/workbench/services/configuration/common/configuration.ts export const LOCAL_MACHINE_SCOPES = [ConfigurationScope.APPLICATION, ConfigurationScope.WINDOW, ConfigurationScope.RESOURCE]; export const REMOTE_MACHINE_SCOPES = [ConfigurationScope.MACHINE, ConfigurationScope.WINDOW, ConfigurationScope.RESOURCE]; export const WORKSPACE_SCOPES = [ConfigurationScope.WINDOW, ConfigurationScope.RESOURCE]; export const FOLDER_SCOPES = [ConfigurationScope.RESOURCE]; export type IConfigurationKey = { type: 'user' | 'workspaces' | 'folder', key: string }; export interface IConfigurationCache { read(key: IConfigurationKey): Promise; write(key: IConfigurationKey, content: string): Promise; remove(key: IConfigurationKey): Promise; }