configuration.ts ×1

Frontier kind: Code frontier

unlabeled · c_ad3270a5be42

301 tests · 8681 LOC · 39 files · introduces 0 tests · 101 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
1 range101 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1001 ranges8681 lines · 39 files · Browse complete extent
All tests (intent)
301 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 101 introduced LOC across 1 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/workbench/services/configuration/common/configuration.ts 101 introduced LOC · 1 range

Open complete file

1 > /*--------------------------------------------------------------------------------------------- configuration.ts
2 > * Copyright (c) Microsoft Corporation. All rights reserved.
3 > * Licensed under the MIT License. See License.txt in the project root for license information.
4 > *--------------------------------------------------------------------------------------------*/
5 >
6 > import { ConfigurationScope } from '../../../../platform/configuration/common/configurationRegistry.js';
7 > import { URI } from '../../../../base/common/uri.js';
8 > import { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';
9 > import { refineServiceDecorator } from '../../../../platform/instantiation/common/instantiation.js';
10 > import { Event } from '../../../../base/common/event.js';
11 > import { ResourceMap } from '../../../../base/common/map.js';
12 > import { IAnyWorkspaceIdentifier } from '../../../../platform/workspace/common/workspace.js';
13 >
14 > export const FOLDER_CONFIG_FOLDER_NAME = '.vscode';
15 > export const FOLDER_SETTINGS_NAME = 'settings';
16 > export const FOLDER_SETTINGS_PATH = `${FOLDER_CONFIG_FOLDER_NAME}/${FOLDER_SETTINGS_NAME}.json`;
17 >
18 > export const defaultSettingsSchemaId = 'vscode://schemas/settings/default';
19 > export const userSettingsSchemaId = 'vscode://schemas/settings/user';
20 > export const profileSettingsSchemaId = 'vscode://schemas/settings/profile';
21 > export const machineSettingsSchemaId = 'vscode://schemas/settings/machine';
22 > export const workspaceSettingsSchemaId = 'vscode://schemas/settings/workspace';
23 > export const folderSettingsSchemaId = 'vscode://schemas/settings/folder';
24 > export const launchSchemaId = 'vscode://schemas/launch';
25 > export const tasksSchemaId = 'vscode://schemas/tasks';
26 > export const mcpSchemaId = 'vscode://schemas/mcp';
27 >
28 > export const APPLICATION_SCOPES = [ConfigurationScope.APPLICATION, ConfigurationScope.APPLICATION_MACHINE];
29 > export const PROFILE_SCOPES = [ConfigurationScope.MACHINE, ConfigurationScope.WINDOW, ConfigurationScope.RESOURCE, ConfigurationScope.LANGUAGE_OVERRIDABLE, ConfigurationScope.MACHINE_OVERRIDABLE];
30 > export const LOCAL_MACHINE_PROFILE_SCOPES = [ConfigurationScope.WINDOW, ConfigurationScope.RESOURCE, ConfigurationScope.LANGUAGE_OVERRIDABLE];
31 > export const LOCAL_MACHINE_SCOPES = [ConfigurationScope.APPLICATION, ...LOCAL_MACHINE_PROFILE_SCOPES];
32 > export const REMOTE_MACHINE_SCOPES = [ConfigurationScope.MACHINE, ConfigurationScope.APPLICATION_MACHINE, ConfigurationScope.WINDOW, ConfigurationScope.RESOURCE, ConfigurationScope.LANGUAGE_OVERRIDABLE, ConfigurationScope.MACHINE_OVERRIDABLE];
33 > export const WORKSPACE_SCOPES = [ConfigurationScope.WINDOW, ConfigurationScope.RESOURCE, ConfigurationScope.LANGUAGE_OVERRIDABLE, ConfigurationScope.MACHINE_OVERRIDABLE];
34 > export const FOLDER_SCOPES = [ConfigurationScope.RESOURCE, ConfigurationScope.LANGUAGE_OVERRIDABLE, ConfigurationScope.MACHINE_OVERRIDABLE];
35 >
36 > export const TASKS_CONFIGURATION_KEY = 'tasks';
37 > export const LAUNCH_CONFIGURATION_KEY = 'launch';
38 > export const MCP_CONFIGURATION_KEY = 'mcp';
39 >
40 > export const WORKSPACE_STANDALONE_CONFIGURATIONS = Object.create(null);
41 > WORKSPACE_STANDALONE_CONFIGURATIONS[TASKS_CONFIGURATION_KEY] = `${FOLDER_CONFIG_FOLDER_NAME}/${TASKS_CONFIGURATION_KEY}.json`;
42 > WORKSPACE_STANDALONE_CONFIGURATIONS[LAUNCH_CONFIGURATION_KEY] = `${FOLDER_CONFIG_FOLDER_NAME}/${LAUNCH_CONFIGURATION_KEY}.json`;
43 > WORKSPACE_STANDALONE_CONFIGURATIONS[MCP_CONFIGURATION_KEY] = `${FOLDER_CONFIG_FOLDER_NAME}/${MCP_CONFIGURATION_KEY}.json`;
44 > export const USER_STANDALONE_CONFIGURATIONS = Object.create(null);
45 > USER_STANDALONE_CONFIGURATIONS[TASKS_CONFIGURATION_KEY] = `${TASKS_CONFIGURATION_KEY}.json`;
46 > USER_STANDALONE_CONFIGURATIONS[MCP_CONFIGURATION_KEY] = `${MCP_CONFIGURATION_KEY}.json`;
47 >
48 > export type ConfigurationKey = { type: 'defaults' | 'user' | 'workspaces' | 'folder'; key: string };
49 >
50 > export interface IConfigurationCache {
51 >
52 > needsCaching(resource: URI): boolean;
53 > read(key: ConfigurationKey): Promise<string>;
54 > write(key: ConfigurationKey, content: string): Promise<void>;
55 > remove(key: ConfigurationKey): Promise<void>;
56 >
57 > }
58 >
59 > export type RestrictedSettings = {
60 > default: ReadonlyArray<string>;
61 > application?: ReadonlyArray<string>;
62 > userLocal?: ReadonlyArray<string>;
63 > userRemote?: ReadonlyArray<string>;
64 > workspace?: ReadonlyArray<string>;
65 > workspaceFolder?: ResourceMap<ReadonlyArray<string>>;
66 > };
67 >
68 > export const IWorkbenchConfigurationService = refineServiceDecorator<IConfigurationService, IWorkbenchConfigurationService>(IConfigurationService);
69 > export interface IWorkbenchConfigurationService extends IConfigurationService {
70 > /**
71 > * Restricted settings defined in each configuration target
72 > */
73 > readonly restrictedSettings: RestrictedSettings;
74 >
75 > /**
76 > * Event that triggers when the restricted settings changes
77 > */
78 > readonly onDidChangeRestrictedSettings: Event<RestrictedSettings>;
79 >
80 > /**
81 > * A promise that resolves when the remote configuration is loaded in a remote window.
82 > * The promise is resolved immediately if the window is not remote.
83 > */
84 > whenRemoteConfigurationLoaded(): Promise<void>;
85 >
86 > /**
87 > * Initialize configuration service for the given workspace
88 > * @param arg workspace Identifier
89 > */
90 > initialize(arg: IAnyWorkspaceIdentifier): Promise<void>;
91 >
92 > /**
93 > * Returns true if the setting can be applied for all profiles otherwise false.
94 > * @param setting
95 > */
96 > isSettingAppliedForAllProfiles(setting: string): boolean;
97 > }
98 >
99 > export const TASKS_DEFAULT = '{\n\t\"version\": \"2.0.0\",\n\t\"tasks\": []\n}';
100 >
101 > export const APPLY_ALL_PROFILES_SETTING = 'workbench.settings.applyToAllProfiles';