userDataProfile.ts ×7

Frontier kind: Code frontier

unlabeled · c_2e8407230c8f

16 tests · 12777 LOC · 55 files · introduces 0 tests · 25 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
7 ranges25 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1962 ranges12777 lines · 55 files · Browse complete extent
All tests (intent)
16 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: 25 introduced LOC across 7 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

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

Open complete file

430
431 async updateProfile(profile: IUserDataProfile, options: IUserDataProfileUpdateOptions): Promise<IUserDataProfile> {
432 > if (profile.isAgentsWindowProfile) { userDataProfile.ts
433 throw new Error('Cannot update agents window profile');
434 }
436 > const profilesToUpdate: IUserDataProfile[] = [];
437 > for (const existing of this.profiles) {
438 > let profileToUpdate: Mutable<IUserDataProfile> | undefined;
439 >
440 > if (profile.id === existing.id) {
441 > if (!existing.isDefault) {
442 profileToUpdate = toUserDataProfile(existing.id, options.name ?? existing.name, existing.location, this.profilesCacheHome, {
443 icon: options.icon === null ? undefined : options.icon ?? existing.icon,
446 workspaces: options.workspaces ?? existing.workspaces,
447 }, this.defaultProfile);
448 > } else if (options.workspaces) { userDataProfile.ts
449 profileToUpdate = existing;
450 profileToUpdate.workspaces = options.workspaces;
451 }
453
454 else if (options.workspaces) {
459 }
460 }
462 > if (profileToUpdate) {
463 > profilesToUpdate.push(profileToUpdate);
464 > }
465 > }
466 >
467 > if (!profilesToUpdate.length) {
468 if (profile.isDefault) {
469 throw new Error('Cannot update default profile');
471 throw new Error(`Profile '${profile.name}' does not exist`);
472 }
474 > this.updateProfiles([], [], profilesToUpdate);
475 >
476 > const updatedProfile = this.profiles.find(p => p.id === profile.id);
477 > if (!updatedProfile) {
478 throw new Error(`Profile '${profile.name}' was not updated`);
479 }
481 > return updatedProfile;
482 > }
483
484 async removeProfile(profileToRemove: IUserDataProfile): Promise<void> {