Skip to content

Commit

Permalink
Fix global project options not showing
Browse files Browse the repository at this point in the history
  • Loading branch information
ThadHouse committed Dec 11, 2023
1 parent 2fc344c commit b8f261b
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions vscode-wpilib/src/vscommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,25 @@ interface IUpdatePair {

class UpdatePair implements IUpdatePair, vscode.MessageItem {
public title: string;
public isCloseAffordance: boolean = true;
public isCloseAffordance: boolean;
public yes: boolean;
public global: boolean;

public constructor(title: string, yes: boolean, global: boolean) {
public constructor(title: string, yes: boolean, global: boolean, close: boolean) {
this.title = title;
this.yes = yes;
this.global = global;
this.isCloseAffordance = close;
}
}

async function globalProjectSettingUpdate(message: string): Promise<IUpdatePair | undefined> {
const opts: UpdatePair[] = [
new UpdatePair(i18n('ui', 'Yes (Project)'), true, false),
new UpdatePair(i18n('ui', 'Yes (Global)'), true, true),
new UpdatePair(i18n('ui', 'No (Project)'), false, false),
new UpdatePair(i18n('ui', 'No (Global)'), false, true),
new UpdatePair(i18n('ui', 'Cancel'), false, false),
new UpdatePair(i18n('ui', 'Yes (Project)'), true, false, false),
new UpdatePair(i18n('ui', 'Yes (Global)'), true, true, false),
new UpdatePair(i18n('ui', 'No (Project)'), false, false, false),
new UpdatePair(i18n('ui', 'No (Global)'), false, true, false),
new UpdatePair(i18n('ui', 'Cancel'), false, false, true),
];

const result = await vscode.window.showInformationMessage<UpdatePair>(message, {modal: true}, ...opts);
Expand Down

0 comments on commit b8f261b

Please sign in to comment.