userDataProfile.ts ×7

Frontier kind: Code frontier

unlabeled · c_d0154dee1b8b

316 tests · 12577 LOC · 54 files · introduces 0 tests · 21 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
7 ranges21 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1903 ranges12577 lines · 54 files · Browse complete extent
All tests (intent)
316 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: 21 introduced LOC across 7 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/userDataProfile/common/userDataProfile.ts 21 introduced LOC · 7 ranges

Open complete file

281 protected _profilesObject: UserDataProfilesObject | undefined;
282 protected get profilesObject(): UserDataProfilesObject {
283 > if (!this._profilesObject) { userDataProfile.ts
284 > const defaultProfile = this.createDefaultProfile();
285 > const profiles: Array<Mutable<IUserDataProfile>> = [defaultProfile];
286 > try {
287 > for (const storedProfile of this.getStoredProfiles()) {
288 if (this.isInvalidProfile(storedProfile)) {
289 this.logService.warn('Skipping the invalid stored profile', storedProfile.location || storedProfile.name);
302 defaultProfile));
303 }
304 > } catch (error) { userDataProfile.ts
305 this.logService.error(error);
306 }
307 > const emptyWindows = new Map<string, IUserDataProfile>(); userDataProfile.ts
308 > if (profiles.length) {
309 > try {
310 > const profileAssociaitions = this.getStoredProfileAssociations();
311 > if (profileAssociaitions.workspaces) {
312 for (const [workspacePath, profileId] of Object.entries(profileAssociaitions.workspaces)) {
313 const workspace = URI.parse(workspacePath);
320 }
321 }
322 > if (profileAssociaitions.emptyWindows) { userDataProfile.ts
323 for (const [windowId, profileId] of Object.entries(profileAssociaitions.emptyWindows)) {
324 const profile = profiles.find(p => p.id === profileId);
328 }
329 }
330 > } catch (error) { userDataProfile.ts
331 this.logService.error(error);
332 }
334 > this._profilesObject = { profiles, emptyWindows };
335 > }
336 > return this._profilesObject;
337 > }
338
339 private isInvalidProfile(storedProfile: StoredUserDataProfile): boolean {
351
352 protected createDefaultProfile() {
353 > const defaultProfile = toUserDataProfile('__default__profile__', localize('defaultProfile', "Default"), this.environmentService.userRoamingDataHome, this.profilesCacheHome); userDataProfile.ts
354 > return { ...defaultProfile, extensionsResource: this.getDefaultProfileExtensionsLocation() ?? defaultProfile.extensionsResource, isDefault: true };
355 > }
356
357 async createTransientProfile(workspaceIdentifier?: IAnyWorkspaceIdentifier): Promise<IUserDataProfile> {