517
518
async setProfileForWorkspace(workspaceIdentifier: IAnyWorkspaceIdentifier, profileToSet: IUserDataProfile): Promise<void> {
519
>
const profile = this.profiles.find(p => p.id === profileToSet.id);
userDataProfile.ts
520
>
if (!profile) {
521
throw new Error(`Profile '${profileToSet.name}' does not exist`);
522
}
524
>
const workspace = this.getWorkspace(workspaceIdentifier);
525
>
if (URI.isUri(workspace)) {
526
>
const workspaces = profile.workspaces ? [...profile.workspaces] : [];
527
>
if (!workspaces.some(w => this.uriIdentityService.extUri.isEqual(w, workspace))) {
528
workspaces.push(workspace);
529
await this.updateProfile(profile, { workspaces });
530
}
532
this.updateEmptyWindowAssociation(workspace, profile, false);
533
this.updateStoredProfiles(this.profiles);
534
}
536
537
unsetWorkspace(workspaceIdentifier: IAnyWorkspaceIdentifier, transient: boolean = false): void {