Skip to content

Commit

Permalink
show userpresets in project outline (#3877)
Browse files Browse the repository at this point in the history
  • Loading branch information
moyo1997 authored Jul 10, 2024
1 parent 1525857 commit 573f7cc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Bug Fixes:

- Fix issue where `cmake.preferredGenerators` wasn't falling back to the next entry when the first entry didn't exist [#2709](https://github.com/microsoft/vscode-cmake-tools/issues/2709)
- Potential fix for attempting to load a non-variants file as a variants file and throwing a parse exception [#3727](https://github.com/microsoft/vscode-cmake-tools/issues/3727)
- Fix issue where `cmakeUserPresets.json` not showing up in project outline. [#3832](https://github.com/microsoft/vscode-cmake-tools/issues/3832)
- Fix edge case where parsing tests fails when additional output is printed before tests json. [#3750](https://github.com/microsoft/vscode-cmake-tools/issues/3750)
- Fix issue where `Configure with CMake Debugger` fails on restart because the previously used pipe to CMake Debugger is no longer available. [#3582](https://github.com/microsoft/vscode-cmake-tools/issues/3582)

Expand Down
5 changes: 5 additions & 0 deletions src/projectOutline/projectOutline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,11 @@ export class ProjectNode extends BaseNode {
children.push(new SourceFileNode(this.id, this.folder, this.sourceDirectory, possiblePreset));
}

const possibleUserPreset = path.join(this.sourceDirectory, 'CMakeUserPresets.json');
if (fs.existsSync(possibleUserPreset)) {
children.push(new SourceFileNode(this.id, this.folder, this.sourceDirectory, possibleUserPreset));
}

return children;
}

Expand Down

0 comments on commit 573f7cc

Please sign in to comment.