Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resharper - is it possible to go to method's implementation on CTRL-click instead of going to declaration?

if I do CTRL-click on method's name in VS2012 with Resharper 8, I'm redirected to the method's "declaration" - and that's quite inconvenient if I have lots of interfaces in my project.

If it possible to configure resharper to go right to the IMPLEMENTATIONS of the method (and if there is more than one - display a context menu which I need to select the desired method from)? I can achieve this if I do right-click -> "Go to Implementation" but I really prefer to have this on ctrl-click.

like image 426
avs099 Avatar asked Nov 29 '13 23:11

avs099


People also ask

How do you open the implementation method in Visual Studio?

Choose Navigate | Go To Implementation in the main menu, press Ctrl+F12 , or click the symbol while holding Ctrl+Alt keys. Note that in Visual Studio 2017 and later, the Ctrl+Alt -click is used for adding multiple carets.

How do I navigate to implement a method in Intellij?

Go to implementation To navigate to the super method, press Ctrl+U . To navigate to the implementation, press Ctrl+Alt+B .

How do I enable F12 in Visual Studio?

Go to Tools -> Options -> Keyboard, Reset all settings. Restart your visual studio and then try to use F12.


2 Answers

CTRL+Click = Go to declaration

CTRL+ALT+Click = Go to implementation

CTRL+SHIFT+Click = Peek to declaration (Visual Studio 2013)

like image 105
RuudKok Avatar answered Sep 27 '22 21:09

RuudKok


I don't think you can re-assign the CTRL+LeftClick Option. Per their documentation.

By default, Go To Declaration is available by Ctrl + left-click. To change the default behavior, use controls on the Search & Navigation page of the Options dialog box. For more information, see ReSharper Options: Environment: Search & Navigation

Since it says "change", I went and checked the Search & Navigation section mentioned above to verify if this behavior can indeed be changed. But the change is simply a Checkbox that says.

Go To Declaration on <Control + Left Click> in editor. 

I unchecked this option and saved it, and now, I get nothing if I CTRL+Left Click a method name. So I think you can only disable or enable this option, not re-assign the keys.

like image 30
Shiva Avatar answered Sep 27 '22 21:09

Shiva