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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user