Eclipse and opening implementation of an interface

As a Java dev, a lot of code implementation is done against interfaces. In Eclipse, F3 goes to the definition of an interface.

In previous versions of Eclipse (3.2/3.3/3.4 era), I would always install the implementors plugin which added Alt-F3 as an ‘open implementation’ shortcut.

In Eclipse 3.6, this functionality is now built-in. If you ctrl-click on a method, it pops up a dialog asking if you want to open the implementation or the definition.

If you goto preferences…keys, and filter by ‘open i’, there will be an open implementation option. Assign it to whatever key you want (I use Alt-F3 due to familiarity with Implementors). Now, if you press F3, it will continue to take you to the definition. Alt-F3 will now take you to the implementation. Open implementor works regardless of whether you’re in the interface definition, or on a caller of the method.

It's only fair to share...
Share on FacebookGoogle+Tweet about this on TwitterShare on LinkedIn

Leave a Reply