Update Select Configurations command to offer Edit Configs JSON option (#3519)

* Update Select Configurations command to offer Edit Configs JSON option

* Add 'Edit Configurations (UI)' option to Select Configuration menu
This commit is contained in:
Colen Garoutte-Carson
2019-04-24 11:19:53 -07:00
committed by GitHub
parent f3a02fde4e
commit cfc908a1ac
2 changed files with 7 additions and 2 deletions
@@ -436,7 +436,11 @@ export class CppProperties {
public select(index: number): Configuration {
if (index === this.configurationJson.configurations.length) {
this.handleConfigurationEditCommand(vscode.window.showTextDocument);
this.handleConfigurationEditUICommand(vscode.window.showTextDocument);
return;
}
if (index === this.configurationJson.configurations.length + 1) {
this.handleConfigurationEditJSONCommand(vscode.window.showTextDocument);
return;
}
+2 -1
View File
@@ -171,7 +171,8 @@ export class UI {
for (let i: number = 0; i < configurationNames.length; i++) {
items.push({ label: configurationNames[i], description: "", index: i });
}
items.push({ label: "Edit Configurations...", description: "", index: configurationNames.length });
items.push({ label: "Edit Configurations (UI)", description: "", index: configurationNames.length });
items.push({ label: "Edit Configurations (JSON)", description: "", index: configurationNames.length + 1 });
return vscode.window.showQuickPick(items, options)
.then(selection => (selection) ? selection.index : -1);