Skip to content

Commit

Permalink
fixing loaded profile bug
Browse files Browse the repository at this point in the history
Signed-off-by: Chinmay Das <[email protected]>
  • Loading branch information
chinmdas committed Jan 9, 2025
1 parent c9b4563 commit bcbec5a
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions packages/vsce/src/trees/CICSTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,21 @@ export class CICSTree implements vscode.TreeDataProvider<CICSSessionTree> {
const items: vscode.QuickPickItem[] = [];

const profAllAttrs = profileInfo.getAllProfiles();
for (const pName of allCICSProfileNames) {
const osLocInfo = profileInfo.getOsLocInfo(profAllAttrs.find((p) => p.profName === pName));
items.push(new FilterDescriptor(this.getProfileIcon(osLocInfo)[0] + " " + pName));
}
allCICSProfileNames
.filter((name) => {
for (const loadedProfile of this.loadedProfiles) {
if (loadedProfile.label === name) {
return false;
}
}
return true;
})
.map((profileName) => {
const osLocInfo = profileInfo.getOsLocInfo(profAllAttrs.find((p) => p.profName === profileName));
items.push(new FilterDescriptor(this.getProfileIcon(osLocInfo)[0] + " " + profileName));
return { label: profileName };
});

const quickpick = Gui.createQuickPick();
const addProfilePlaceholder = vscode.l10n.t(`Choose "Create new..." to define or select a profile to add to the CICS tree`);
quickpick.items = [configPick, configEdit, ...items];
Expand Down

0 comments on commit bcbec5a

Please sign in to comment.