Skip to content

Commit c4f41f1

Browse files
committed
Rename commands for consistency
1 parent 32b5faf commit c4f41f1

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

integration/vscode/ada/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -723,13 +723,13 @@
723723
"when": "ADA_PROJECT_CONTEXT"
724724
},
725725
{
726-
"command": "ada.runMainAsk",
726+
"command": "ada.buildAndRunMainAsk",
727727
"title": "Ada: Build and run project main...",
728728
"icon": "$(run-all)",
729729
"when": "ADA_PROJECT_CONTEXT"
730730
},
731731
{
732-
"command": "ada.runMainLast",
732+
"command": "ada.buildAndRunMainLast",
733733
"title": "Ada: Build and run last used main",
734734
"icon": "$(run)",
735735
"when": "ADA_PROJECT_CONTEXT"
@@ -760,12 +760,12 @@
760760
],
761761
"editor/title/run": [
762762
{
763-
"command": "ada.runMainLast",
763+
"command": "ada.buildAndRunMainLast",
764764
"when": "editorLangId == ada",
765765
"group": "navigation@0"
766766
},
767767
{
768-
"command": "ada.runMainAsk",
768+
"command": "ada.buildAndRunMainAsk",
769769
"when": "editorLangId == ada",
770770
"group": "navigation@1"
771771
}

integration/vscode/ada/src/commands.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,10 @@ export function registerCommands(context: vscode.ExtensionContext, clients: Exte
3535
);
3636

3737
context.subscriptions.push(
38-
vscode.commands.registerCommand('ada.runMainLast', () => runMainLast())
38+
vscode.commands.registerCommand('ada.buildAndRunMainLast', buildAndRunMainLast)
3939
);
40-
4140
context.subscriptions.push(
42-
vscode.commands.registerCommand('ada.runMainAsk', () => runMainAsk())
41+
vscode.commands.registerCommand('ada.buildAndRunMainAsk', buildAndRunMainAsk)
4342
);
4443

4544
// This is a hidden command that gets called in the default debug
@@ -125,13 +124,13 @@ async function addSupbrogramBoxCommand() {
125124
let lastUsedTaskInfo: { source: string; name: string } | undefined;
126125

127126
/**
128-
* If a task was previously run through the commands `ada.runMainAsk` or
129-
* `ada.runMainLast`, re-run the same task. If not, defer to {@link runMainAsk}
127+
* If a task was previously run through the commands `ada.buildAndRunMainAsk` or
128+
* `ada.buildAndRunMainLast`, re-run the same task. If not, defer to {@link buildAndRunMainAsk}
130129
* to ask the User to select a task to run.
131130
*
132131
* @returns the TaskExecution corresponding to the task.
133132
*/
134-
async function runMainLast() {
133+
async function buildAndRunMainLast() {
135134
const buildAndRunTasks = await getBuildAndRunTasks();
136135
if (lastUsedTaskInfo) {
137136
const matchingTasks = buildAndRunTasks.filter(matchesLastUsedTask);
@@ -143,7 +142,7 @@ async function runMainLast() {
143142
}
144143

145144
// No task was run so far, or the last one run no longer exists
146-
return runMainAsk();
145+
return buildAndRunMainAsk();
147146
}
148147

149148
/**
@@ -179,7 +178,7 @@ interface TaskQuickPickItem extends vscode.QuickPickItem {
179178
* button to add the task to tasks.json (if not already there) and configure it
180179
* there.
181180
*/
182-
async function runMainAsk() {
181+
async function buildAndRunMainAsk() {
183182
function createQuickPickItem(task: vscode.Task): TaskQuickPickItem {
184183
return {
185184
// Mark the last used task with a leading star

0 commit comments

Comments
 (0)