Search code examples
visual-studio-2015code-map

Show overridden methods on Visual Studio Code Map


I've got a hierarchy of MVC controllers inheriting from each other which I've visualised on a Visual Studio Code Map. What I would really like to see is where methods are overridden, so I can see if a particular method on a base controller is overridden on lots of derived controllers (to help me see areas for refactoring).

I've been able to select a single method in a derived controller and see which methods it overrides, but I want to work the other way round and see what overrides a base method.

Is it possible to see all methods which override a specific method on a base controller?


Solution

  • Looks like CodeMap is missing the "Overridden By" query, similar to the "Show Overridden methods" query. I'll log a suggestion bug on your behalf.

    In the meantime you can achieve your goal by querying from the Solution Explorer. Navigate to your base class method, right click and you'll see an "Overridden By" query.

    enter image description here

    You can then drag the results to the code map if required.