Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Comment thread
edriouk marked this conversation as resolved.

// Check if file is excluded based on context restrictions
if (this.context && !matchesContext(f, this.context)) {
cfileItem.setAttribute('excluded', '1');
Expand Down
6 changes: 5 additions & 1 deletion test-data/solutions/USBD/CmsisViewTreeRef.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,21 @@ 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
label=testOutput.test
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
Expand Down
Loading