Open thokra1 opened 4 months ago
@thokra1 Thank you for your github issue! We can't reproduce your issue, you can get the reproduction below. Please let us know if the reproduction steps are incorrect!
ENV:
Repro steps:
Actual result: After double-clicking on the refactored row, it navigates to the correct page
@Yingzi1234 there has been a misunderstanding here. I'm not talking about references in code. I'm talking about the "References" of a target in the project outline.
Consider these outlines in VS Code and VS22:
We have an executable "derp" that links against the static lib "lib". In the list of "References" of derp, you see "lib" showing up and double-clicking on the reference in Visual Studio 2022 jumps directly to the corresponding piece of CMake code.
But doing that in VS Code does no such thing.
Indicentally, in Visual Studio 2022, double-clicking any target or reference in the outline will take you to the corresponding CMake code - expanding/collapsing only seems to happen when using the arrow. VS Code instead expands or collapses targets in the project outline and does nothing for target references.
Dunno if this is intended (it probably is for regular targets) but it awkward that VS Code and VS22 differ here.
@gcampbell-msft Would you agree that aligning the behavior here a little more makes sense or is the way VS22 is handling this not viable in your opinion?
Also as an aside: imported libraries are not referenced at all, not even in VS22, which is a bit weird. Dunno is that is intended or not possible to do at the moment, but it seems inconsistent.
@thokra1 To better address your question, could you provide us with a copy of your reproduction recording and reproduction project? Thank you in advance!
@Yingzi1234 @thokra1 I know what the customer is referring to. There is a "references" dropdown in the Project Outline pane, and in Visual Studio, upon double clicking, it opens the CMakeLists.txt of that reference. We don't currently have support for that in VS Code.
I will mark this as an enhancement request for this feature! Thanks for your interest and use of the Project Outline view.
Brief Issue Summary
The project outline currently correctly lists referenced targets of a target correctly. But double-clicking currently does nothing.
Expected behavior
On double-clicking a reference, open the CMake file containing the corresponding
add_executable
,add_library
etc. call and scroll to the respective line.This is the current behavior of Visual Studio 2022 when opening a folder containing a CMake project.
Actual behavior
Nothing happens.
CMake Tools Diagnostics
No response
Debug Log
No response
Additional Information
VS Code: 1.91.0 Tested extension version: v1.18.42