Skip to content

Commit 78aba51

Browse files
committed
fix eclipse project type detect
1 parent 8103498 commit 78aba51

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

src/EclipseProjectParser.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -569,17 +569,21 @@ function toArray(obj: any): any[] {
569569

570570
function detectProjectType(toolChain: any): EclipseProjectType | undefined {
571571

572-
const toolName = toolChain.$['name'];
572+
const toolId = toolChain.$['id'];
573+
const toolName = toolChain.$['name'] || toolId;
573574

574-
if (/\bARM\b/i.test(toolName)) {
575+
// <toolChain id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.debug.1201710416" name="ARM Cross GCC"
576+
if (/\bARM\b/.test(toolName) || /gnuarmeclipse/.test(toolId)) {
575577
return 'arm';
576578
}
577579

578-
if (/\b(RISCV|RISC-V)\b/i.test(toolName)) {
580+
// <toolChain id="ilg.gnumcueclipse.managedbuild.cross.riscv.toolchain.elf.release.231146001" name="RISC-V Cross GCC…
581+
if (/\b(RISCV|RISC-V)\b/.test(toolName) || /\.riscv\./.test(toolId)) {
579582
return 'riscv';
580583
}
581584

582-
if (/\bSDCC\b/i.test(toolName)) {
585+
// <toolChain errorParsers="" id="cdt.managedbuild.toolchain.sdcc.exe.release.1956586716" name="SDCC Tool Chain"
586+
if (/\bSDCC\b/.test(toolName) || /\.sdcc\./.test(toolId)) {
583587
return 'sdcc';
584588
}
585589
}

0 commit comments

Comments
 (0)