Visual Studio 2010 extension for Go To Interface I

2019-02-07 21:46发布

问题:

Possible Duplicate:
How do you quickly find the implementation(s) of an interface’s method?

I like ReSharper's Go To Implementation feature but I often keep ReSharper disabled. Is there an equivalent extension for Visual Studio 2010?

回答1:

I'm looking for the extension for this little "go to implementation" too. But unfortunately I couldn't find any. May be we will have to wait next version of visual studio or enable ReSharper back (which in my opinion, eating too much resources)

Well the best solution for me right now is to use "Call Hierarchy" feature of VS2010. Just follow my instruction below

  1. Move cursor to the target method name
  2. Press "Ctrl K, Ctrl T" (this will pop up "Call Hierarchy Window")
  3. Press "Down", "Down", "Right", "Down", "Enter" (this will go to your implementation method)
    • Look funny but it is actually the way to use keyboard to navigate to the item you want
  4. [More Explanation]
    • "Down", "Down" --> go to "Implements 'xxx'"
    • "Right" --> expand children
    • "Down" --> focus on the implementation method
    • "Enter" --> navigate to it

Hope this help



回答2:

Ctrl + F12 - Go To Declaration



回答3:

For me, the easiest and free way to get "Go to implementation" functionality in VS2010 (and for VS2008 for that matter) was to

  1. Install free CodeRush Xpress http://msdn.microsoft.com/en-us/vstudio/ee663901

  2. Install "Go to implementator" Code Rush extension by Miha Markic. The author just today, updated his extension to work with most recent CodeRush Xpress 11.2.11 http://blog.rthand.com/page/Go-To-Implementator.aspx

Works very nicely.



回答4:

Short answer, no.

You should aim to keep Resharper enabled 100% of the time, in my opinion. Ensure Solution wide analysis is turned off, use the latest resharper (Resharper 6 is out now) and/or upgrade your PC.



回答5:

I'm honestly not overly familiar with Resharper but if the "Go To implementation" you are talking about is when you can click on a method call and it will take you to that method's code then I would suggest the "Productivity Power Tools" created by Microsoft.

private void foo()
{
 // does stuff
}

private void main()
{
 // hold down CTRL, foo() below will turn into 
 // a hyperlink that you can click on
 foo();
}

Here's the link http://visualstudiogallery.msdn.microsoft.com/d0d33361-18e2-46c0-8ff2-4adea1e34fef/

This will allow you to hold down the CTRL key which turns methods and variables into hyperlinks which when clicked will take you to where these were defined originally.

These Tools also can clean up unused Imports/using statements at the top of you code-behind/class files. And my favorite auto bracket completing



回答6:

Not a keyboard shortcut, however Go To Definition by Noah Richards is a useful, lightweight extension to Visual Studio.