@@ -477,7 +477,10 @@ export class SimpleTaskProvider implements vscode.TaskProvider {
477
477
label : getBuildAndRunTaskPlainName ( main ) ,
478
478
taskDef : {
479
479
type : this . taskType ,
480
- compound : [ buildTask . label , runTask . label ] ,
480
+ compound : [
481
+ getConventionalTaskLabel ( buildTask ) ,
482
+ getConventionalTaskLabel ( runTask ) ,
483
+ ] ,
481
484
} ,
482
485
problemMatchers : [ ] ,
483
486
} ;
@@ -516,7 +519,10 @@ export class SimpleTaskProvider implements vscode.TaskProvider {
516
519
label : getBuildAndRunGNATemulatorTaskPlainName ( main ) ,
517
520
taskDef : {
518
521
type : this . taskType ,
519
- compound : [ buildTask . label , runGNATemulatorTask . label ] ,
522
+ compound : [
523
+ getConventionalTaskLabel ( buildTask ) ,
524
+ getConventionalTaskLabel ( runGNATemulatorTask ) ,
525
+ ] ,
520
526
} ,
521
527
problemMatchers : [ ] ,
522
528
} ;
@@ -525,7 +531,10 @@ export class SimpleTaskProvider implements vscode.TaskProvider {
525
531
label : getBuildAndRunGNATemulatorTaskPlainName ( main , true ) ,
526
532
taskDef : {
527
533
type : this . taskType ,
528
- compound : [ buildTask . label , runGNATemulatorTaskForDebug . label ] ,
534
+ compound : [
535
+ getConventionalTaskLabel ( buildTask ) ,
536
+ getConventionalTaskLabel ( runGNATemulatorTaskForDebug ) ,
537
+ ] ,
529
538
} ,
530
539
problemMatchers : [ ] ,
531
540
} ;
@@ -1213,13 +1222,17 @@ export function isFromWorkspace(task: vscode.Task): boolean {
1213
1222
/**
1214
1223
*
1215
1224
* @param task - a task
1216
- * @returns the label typically generated for that task by vscode. For tasks not
1217
- * defined explicitly in the workspace, this is `ada : <task name>`. For tasks
1218
- * defined in the workspace simply return the name which should already include
1219
- * the convention.
1225
+ * @returns the label typically generated for that task by vscode. For tasks
1226
+ * not defined explicitly in the workspace, this is `<task type> : <task name>`.
1227
+ * For tasks defined in the workspace simply return the name which should
1228
+ * already include the convention.
1220
1229
*/
1221
- export function getConventionalTaskLabel ( task : vscode . Task ) : string {
1222
- return isFromWorkspace ( task ) ? task . name : `${ task . source } : ${ task . name } ` ;
1230
+ export function getConventionalTaskLabel ( task : vscode . Task | PredefinedTask ) : string {
1231
+ if ( task instanceof vscode . Task ) {
1232
+ return isFromWorkspace ( task ) ? task . name : `${ task . source } : ${ task . name } ` ;
1233
+ } else {
1234
+ return `${ task . taskDef . type } : ${ task . label } ` ;
1235
+ }
1223
1236
}
1224
1237
1225
1238
/**
0 commit comments