Skip to content

Commit f2c6e9e

Browse files
committed
[optimize] show toolchain prefix for 'ToolchainConfigure'
1 parent 51dde99 commit f2c6e9e

2 files changed

Lines changed: 13 additions & 6 deletions

File tree

src/OperationExplorer.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -714,11 +714,11 @@ export class OperationExplorer {
714714
kind: vscode.QuickPickItemKind.Separator,
715715
},
716716
{
717-
label: 'GNU Arm Embedded Toolchain (arm-none-eabi-gcc)',
717+
label: `GNU Arm Embedded Toolchain (${toolchainManager.getToolchainPrefix('GCC')}gcc)`,
718718
type: 'GCC',
719719
description: this.getStatusTxt(toolchainManager.isToolchainPathReady('GCC'))
720720
+ ` Loc: ${toolchainManager.getToolchainExecutableFolder('GCC')?.path}`,
721-
detail: view_str$operation$setToolchainInstallDir.replace('${name}', 'GNU Arm Embedded Toolchain'),
721+
detail: view_str$operation$setToolchainInstallDir.replace('${name}', `GNU Arm Embedded Toolchain`),
722722
buttons: [
723723
{
724724
iconPath: vscode.Uri.file(resManager.GetIconByName('EditTitleString_16x.svg').path),
@@ -727,11 +727,11 @@ export class OperationExplorer {
727727
]
728728
},
729729
{
730-
label: 'RISC-V GCC Toolchain (riscv-gcc)',
730+
label: `RISC-V GCC Toolchain (${toolchainManager.getToolchainPrefix('RISCV_GCC')}gcc)`,
731731
type: 'RISCV_GCC',
732732
description: this.getStatusTxt(toolchainManager.isToolchainPathReady('RISCV_GCC'))
733733
+ ` Loc: ${toolchainManager.getToolchainExecutableFolder('RISCV_GCC')?.path}`,
734-
detail: view_str$operation$setToolchainInstallDir.replace('${name}', 'RISC-V GCC Toolchain'),
734+
detail: view_str$operation$setToolchainInstallDir.replace('${name}', `RISC-V GCC Toolchain`),
735735
buttons: [
736736
{
737737
iconPath: vscode.Uri.file(resManager.GetIconByName('EditTitleString_16x.svg').path),
@@ -740,11 +740,11 @@ export class OperationExplorer {
740740
]
741741
},
742742
{
743-
label: 'Universal GCC Toolchain (gcc)',
743+
label: `Universal GCC Toolchain (${toolchainManager.getToolchainPrefix('ANY_GCC')}gcc)`,
744744
type: 'ANY_GCC',
745745
description: this.getStatusTxt(toolchainManager.isToolchainPathReady('ANY_GCC'))
746746
+ ` Loc: ${toolchainManager.getToolchainExecutableFolder('ANY_GCC')?.path}`,
747-
detail: view_str$operation$setToolchainInstallDir.replace('${name}', 'ANY GCC Toolchain'),
747+
detail: view_str$operation$setToolchainInstallDir.replace('${name}', `ANY GCC Toolchain`),
748748
buttons: [
749749
{
750750
iconPath: vscode.Uri.file(resManager.GetIconByName('EditTitleString_16x.svg').path),

src/ToolchainManager.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,13 @@ export class ToolchainManager {
412412
}
413413
}
414414

415+
getToolchainPrefix(toolchainName: ToolchainName): string | undefined {
416+
const toolchain = this.toolchainMap.get(toolchainName);
417+
if (toolchain && toolchain.getToolchainPrefix) {
418+
return toolchain.getToolchainPrefix();
419+
}
420+
}
421+
415422
isToolchainPathReady(name: ToolchainName): boolean {
416423
return this.getToolchainExecutableFolder(name)?.IsDir() || false;
417424
}

0 commit comments

Comments
 (0)