Feature: Allow CodeNav tool window to be pinned to a document
CodeNav currently follows the active document, which is normally very useful. It would also be useful to have an option to pin/lock a CodeNav tool window to its current document, so that switching to another editor document does not change that CodeNav view. Ideally, multiple CodeNav tool windows could be opened and independently pinned to different documents. Example use case: during a large refactoring, I want one CodeNav view pinned to SomeLegacyClass.cs and another pinned to NewClass.cs. This would make it easy to compare and migrate members between two large classes while retaining CodeNav's sorting/filtering. Possible UI:
- Pin/lock button in the CodeNav tool window
- Unpinned = follows active document (current behavior)
- Pinned = remains associated with the selected document
- Optionally allow multiple independently pinned CodeNav windows
That's a good feature suggestion!
Pin button added in the latest release 🚀
"Optionally allow multiple independently pinned CodeNav windows"
Unfortunately with VSExtensibility it is (currently) impossible to have multiples of the same toolwindow. However I could create a Toolwindow CodeNav2, 3, ... etc. But it would have to be limited to a fixed number of windows.
Questions:
- How many copies of the toolwindow would be handy?
- Should creating multiple toolwindows be linked to pinning?
- Is it ever handy to have multiple toolwindows without pinning, all following the same document?
Glad you like it - My thoughts My problem was to compare while refactoring complex legacy code, so obviously at least 2, I would say for simplicity in developing and operating, having the ability to pin a toolwindow to an open document would cover many use cases
Each having a separation CodeNav2 I dont think would be a problem
Having multiple toolwindows on the same document, I can see where a .cs file could have multiple complex classes, and being able to independently navigate them could be useful
Grab the new release! 🚀
You can open CodeNav 2 from the extensions menu.
Great!
One quick comment, when i select/double click a method in codenav or codenav2 i would expect the code window to come forward and navigate to that method
Can work around it by tearing the code window off so its easy to find
Keep up the good work!
Grab the new release 🚀
Great its working I notice the Pin no longer behaves, the glyph doesnt change But having 2 windows up seems to pin them, and clicking on a class function pops the window forward
Correction, I wasnt noticing the rectangle around Pin With CodeNav and CodeNav2 running, I can get 2 windows up having seperate classes If I tear one window off so I can see it side by side, selecting a function in the CodeNav for that window doesnt navigate to the proper line If I leave both windows in the VS main window, it operates as expected
Please try the new release!