configurationModels.ts ×6

Frontier kind: Joint frontier

unlabeled · c_7e03bdff61d2

2 tests · 12976 LOC · 51 files · introduces 1 test · 60 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
9 ranges60 lines · 2 files
Tests
1 test

Contains — complete concept membership

All code (extent)
2070 ranges12976 lines · 51 files · Browse complete extent
All tests (intent)
2 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.

1 test introduced at this concept.

Introduced code

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

2 files ranked by introduced lines: 60 introduced LOC across 9 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/workbench/services/configuration/common/configurationModels.ts 39 introduced LOC · 6 ranges

Open complete file

100
101 constructor(
102 > defaults: ConfigurationModel, configurationModels.ts
103 > policy: ConfigurationModel,
104 > application: ConfigurationModel,
105 > localUser: ConfigurationModel,
106 > remoteUser: ConfigurationModel,
107 > workspaceConfiguration: ConfigurationModel,
108 > folders: ResourceMap<ConfigurationModel>,
109 > memoryConfiguration: ConfigurationModel,
110 > memoryConfigurationByResource: ResourceMap<ConfigurationModel>,
111 > private readonly _workspace: Workspace | undefined,
112 > logService: ILogService
113 > ) {
114 > super(defaults, policy, application, localUser, remoteUser, workspaceConfiguration, folders, memoryConfiguration, memoryConfigurationByResource, logService);
115 > }
116
117 override getValue(key: string | undefined, overrides: IConfigurationOverrides = {}): unknown {
118 > return super.getValue(key, overrides, this._workspace); configurationModels.ts
119 > }
120
121 override inspect<C>(key: string, overrides: IConfigurationOverrides = {}): IConfigurationValue<C> {
142
143 compare(other: Configuration): IConfigurationChange {
144 > const compare = (fromKeys: string[], toKeys: string[], overrideIdentifier?: string): string[] => { configurationModels.ts
145 > const keys: string[] = [];
146 > keys.push(...toKeys.filter(key => fromKeys.indexOf(key) === -1));
147 > keys.push(...fromKeys.filter(key => toKeys.indexOf(key) === -1));
148 > keys.push(...fromKeys.filter(key => {
149 > // Ignore if the key does not exist in both models
150 > if (toKeys.indexOf(key) === -1) {
151 return false;
152 }
153 > // Compare workspace value configurationModels.ts
154 > if (!equals(this.getValue(key, { overrideIdentifier }), other.getValue(key, { overrideIdentifier }))) {
155 return true;
156 }
157 > // Compare workspace folder value configurationModels.ts
158 > return this._workspace && this._workspace.folders.some(folder => !equals(this.getValue(key, { resource: folder.uri, overrideIdentifier }), other.getValue(key, { resource: folder.uri, overrideIdentifier })));
159 > }));
160 > return keys;
161 > };
162 > const keys = compare(this.allKeys(), other.allKeys());
163 > const overrides: [string, string[]][] = [];
164 > const allOverrideIdentifiers = distinct([...this.allOverrideIdentifiers(), ...other.allOverrideIdentifiers()]);
165 > for (const overrideIdentifier of allOverrideIdentifiers) {
166 > const keys = compare(this.getAllKeysForOverrideIdentifier(overrideIdentifier), other.getAllKeysForOverrideIdentifier(overrideIdentifier), overrideIdentifier);
167 > if (keys.length) {
168 overrides.push([overrideIdentifier, keys]);
169 }
171 > return { keys, overrides };
172 > }
173
174 }
src/vs/platform/configuration/common/configurationModels.ts 21 introduced LOC · 3 ranges

Open complete file

1096
1097 allKeys(): string[] {
1098 > const keys: Set<string> = new Set<string>(); configurationModels.ts
1099 > this._defaultConfiguration.keys.forEach(key => keys.add(key));
1100 > this.userConfiguration.keys.forEach(key => keys.add(key));
1101 > this._workspaceConfiguration.keys.forEach(key => keys.add(key));
1102 > this._folderConfigurations.forEach(folderConfiguration => folderConfiguration.keys.forEach(key => keys.add(key)));
1103 > return [...keys.values()];
1104 > }
1105
1106 protected allOverrideIdentifiers(): string[] {
1107 > const keys: Set<string> = new Set<string>(); configurationModels.ts
1108 > this._defaultConfiguration.getAllOverrideIdentifiers().forEach(key => keys.add(key));
1109 > this.userConfiguration.getAllOverrideIdentifiers().forEach(key => keys.add(key));
1110 > this._workspaceConfiguration.getAllOverrideIdentifiers().forEach(key => keys.add(key));
1111 > this._folderConfigurations.forEach(folderConfiguration => folderConfiguration.getAllOverrideIdentifiers().forEach(key => keys.add(key)));
1112 > return [...keys.values()];
1113 > }
1114
1115 protected getAllKeysForOverrideIdentifier(overrideIdentifier: string): string[] {
1116 > const keys: Set<string> = new Set<string>(); configurationModels.ts
1117 > this._defaultConfiguration.getKeysForOverrideIdentifier(overrideIdentifier).forEach(key => keys.add(key));
1118 > this.userConfiguration.getKeysForOverrideIdentifier(overrideIdentifier).forEach(key => keys.add(key));
1119 > this._workspaceConfiguration.getKeysForOverrideIdentifier(overrideIdentifier).forEach(key => keys.add(key));
1120 > this._folderConfigurations.forEach(folderConfiguration => folderConfiguration.getKeysForOverrideIdentifier(overrideIdentifier).forEach(key => keys.add(key)));
1121 > return [...keys.values()];
1122 > }
1123
1124 static parse(data: IConfigurationData, logService: ILogService): Configuration {