codecadwallader/codemaid

`Find in Solution Explorer` command Collapses Solution Explorer instead

astrohart opened this issue · 2 comments

Environment

  • Visual Studio version: [2019 Enterprise v16.11.26]
  • CodeMaid version: [12.0]
  • Code language: [C#]

Description

When I click the Extensions menu in Visual Studio, point to Code Maid, and then click Find in Solution Explorer with a .cs file open, Solution Explorer collapses all its expanded TreeView nodes -- it's as if I actually chose the Collapse All Recursively command instead.

It's as if, inside CodeMaid's source code itself, the Find in Solution Explorer command is "wired up" to the incorrect "command handler."

Steps to recreate

  1. Open a C# project in Visual Studio.
  2. Open Solution Explorer.
  3. Click the Tools menu, and then click Options.
  4. Under Projects and Solutions, click General.
  5. Place a checkmark in the Track Active Item in Solution Explorer check box.
  6. Click OK.
  7. Find and double-click on a .cs file in your project to open it in the Editor.
  8. Navigate somewhere else in your source code.
  9. Click the Extensions menu, point to CodeMaid, and then click Find in Solution Explorer.

Current behavior

When the above steps are followed, Solution Explorer's tree view collapses all, recursively.

Expected behavior

The desired outcome of the steps above is for the tree view in Solution Explorer to jump to the file that is currently open.

Thanks for reporting the issue. I have been unable to reproduce the issue as you have described.

I'm curious, if tracking the active item is active isn't the solution explorer already jumping to the file that is currently open?

@codecadwallader Yes, tracking the active item is open, but, for some reason, it did not function, thus the need for me to activate the Find in Solution Explorer command. Make sure tracking the active item is activated when you try to reproduce, if you have not already.