vscode-cmake-tools icon indicating copy to clipboard operation
vscode-cmake-tools copied to clipboard

Project outline should provide 'Sync with Active Document'

Open thokra1 opened this issue 1 year ago • 1 comments

Brief Issue Summary

Problem: Currently, switching active documents does not sync the project outline and there doesn't seem to be an option to enable such behavior or other means for the user to sync. The outline does not behave the same way the 'Explorer' and 'Open Editors' panels do.

  • Version tested: 1.86.1

The 'Explorer' and the 'Open Editors' panels sync the active document by default. The behavior is customizable via the "explorer.autoReveal" flag. In VS 2022, there are two options to make this happen in the solution explorer:

  • either by having the IDE track the active item

    • customizable via the options
    • image
  • by letting the user hit a button that does the sync

    • button is invisble if tracking is enabled
    • image

This functionality can be very helpful if one is working with multiple files from multiple different libraries and executables in larger projects. As a first step, reusing the "autoReveal" setting to enable this behavior would already go a long way. Ideally, the VS2022 approach would be the most user-friendly one.

The terminology for this functionality is inconsistent across tools and even within a single tool, like VS2022. At least the terms "track", "sync" and "reveal" are used to describe the same behavior, so sticking to the terminology used for the 'Explorer' (i.e. "reveal") would be consistent.

CMake Tools Diagnostics

No response

Debug Log

No response

Additional Information

No response

thokra1 avatar Feb 15 '24 13:02 thokra1

@thokra1 Thanks for the suggestion! We are currently considering options and planning work around the Project Outline and we will add this to the backlog to consider. I'm not sure when it might land in relation to other things we are planning, but we will definitely put it in the Project Outline bucket for whenever we do work on that view.

Thanks!

gcampbell-msft avatar Feb 15 '24 19:02 gcampbell-msft