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
If you use the f3 key or ctrl+click over a class/method in eclipse, it opens the corresponding class/method.
Search – Eclipse Shortcuts CTRL SHIFT G – Search for current cursor positioned word reference in workspace. CTRL H – Java search in workspace.
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".
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With