Visual Studio is a quick way to find object usage in code

Is there a quick way in Visual Studio to find usage of an object in code? This is what I do all the time, and the way I do it now seems a little awkward.

I am using VS2005, WinForms, VB and CodeRush / RefactorPro.

I am currently doing the following: In Design View

  • Click an object.
  • In the Properties dialog, double-click the object name
  • Copy it to your clipboard (using Ctrl-C or right click and select Copy)
  • Press the F7 key to open the editor code.
  • Press Ctrl-Home to go to the top of the file.
  • Press Ctrl-F which brings up the search dialog
  • Press Ctrl-V to paste the object name into the Find What: text box.
  • Press ENTER to start searching.

Ideally, I would like to click the object in the Design View and then press the hotkey to perform these other steps.

If VS2005 doesn't have anything built in, should I investigate with a macro?

+2


source to share


3 answers


I don’t know about functionality like built-in visual studio, however you can use JetBrains wonderful Resharper plugin which has this functionality like many other excellent features ...



There is another add-on called CodeRush , I haven't used it, but it seems worth looking at.

+2


source


If third party addons are allowed, install R # and use the Find Usage tool. Not sure if R # will be worth it for this feature alone though.



+1


source


Next Reference Tab - CodeRush or CodeRush Xpress

This function allows you to loop through all references to an identifier by simply placing a caret inside the identifier and pressing [TAB]

Find all links - CodeRush

Using the combination [Shift-F12] in CodeRush will create a Links toolbox, which will then display all links to the ID currently in the caret.

+1


source







All Articles