diff --git a/src/views/solution-outline/tree-structure/solution-outline-file-item.ts b/src/views/solution-outline/tree-structure/solution-outline-file-item.ts index 9aca57c3..4c95c12f 100644 --- a/src/views/solution-outline/tree-structure/solution-outline-file-item.ts +++ b/src/views/solution-outline/tree-structure/solution-outline-file-item.ts @@ -44,13 +44,21 @@ export class FileItemBuilder extends SolutionOutlineItemBuilder { const hasCmsisPackRoot = fileValue.indexOf('${CMSIS_PACK_ROOT}') !== -1; const resolvedFilePath = this.resolveFilePath(hasCmsisPackRoot, fileValue); - const fileBaseName = path.basename(fileValue); + const fileBaseName = path.basename(resolvedFilePath); const resourcePath = hasCmsisPackRoot ? resolvedFilePath : f.resolvePath(resolvedFilePath); const description = isApi ? ' (API)' : undefined; const rootFileName = f.rootFileName; const cfileItem = this.createFileItem(cgroupItem, fileBaseName, resourcePath, description); + // set special tooltip if sequences are resolved + if (!hasCmsisPackRoot && resolvedFilePath !== fileValue) { + const tooltip = + `- resolved: \`${resourcePath}\`\n` + + `- original: \`${fileValue}\``; + cfileItem.setAttribute('tooltip', tooltip); + } + // Check if file is excluded based on context restrictions if (this.context && !matchesContext(f, this.context)) { cfileItem.setAttribute('excluded', '1'); diff --git a/test-data/solutions/USBD/CmsisViewTreeRef.txt b/test-data/solutions/USBD/CmsisViewTreeRef.txt index c10be3d9..d2843996 100644 --- a/test-data/solutions/USBD/CmsisViewTreeRef.txt +++ b/test-data/solutions/USBD/CmsisViewTreeRef.txt @@ -32,10 +32,12 @@ solution projectUri=TEST_DIR/solutions/USBD/HID/HID.cproject.yml expandable=1 file - label=$Dname$.test + label=STM32U585AIIx.test expandable=0 resourcePath=TEST_DIR/solutions/USBD/HID/STM32U585AIIx.test features=file + tooltip=- resolved: `TEST_DIR/solutions/USBD/HID/STM32U585AIIx.test` +- original: `$Dname$.test` fileUri=$Dname$.test projectUri=TEST_DIR/solutions/USBD/HID/HID.cproject.yml file @@ -43,6 +45,8 @@ solution expandable=0 resourcePath=TEST_DIR/solutions/USBD/out/HID/B-U585I-IOT02A/Release/testOutput.test features=file + tooltip=- resolved: `TEST_DIR/solutions/USBD/out/HID/B-U585I-IOT02A/Release/testOutput.test` +- original: `$OutDir()$/testOutput.test` fileUri=$OutDir()$/testOutput.test projectUri=TEST_DIR/solutions/USBD/HID/HID.cproject.yml file