Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

shortcut : how to get eclipse to go to the ONLY implementation of an interface's method

If I'm in an interface and pointing to a method name, what can I do to quickly go to the ONLY implementation of that method ?

using eclipse 3.6.x

like image 945
anjanb Avatar asked Mar 18 '11 15:03

anjanb


People also ask

How do I get to the implementation class in Eclipse?

If you use the f3 key or ctrl+click over a class/method in eclipse, it opens the corresponding class/method.

What is Ctrl Shift G in Eclipse?

Search – Eclipse Shortcuts CTRL SHIFT G – Search for current cursor positioned word reference in workspace. CTRL H – Java search in workspace.

How do I enable open implementation in Eclipse?

Sometime in the past year a "feature" snuck into eclipse (perhaps 3.6M*) which tends to get in my way. When you hold down ctrl/cmd over a method, a two-line menu appears with the options "open declaration" and "open implementation".

What does Ctrl k do in Eclipse?

In Eclipse, if the cursor is over a word and you press Ctrl + K you will jump to the next occurrence of that word in the file.


1 Answers

F3 is the typical "go to implementation". For interfaces that go to the interface definition.

Instead use Ctrl + T to see all implementations of the interface definition. You can then easily go to the one you want with the arrow keys and Enter. I believe that the first one is automatically selected so that Ctrl-T + Enter will do what you need.

like image 63
Thorbjørn Ravn Andersen Avatar answered Sep 29 '22 11:09

Thorbjørn Ravn Andersen