Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to jump to super implementation in Eclipse

Tags:

java

eclipse

Given the code segment:

@Override
public String someMethod()
{
  return "foo";
}

Is there a way in Eclipse to quickly jump to the implementation in super? Since it's annotated with @Override, I would think Eclipse would know how to do this.

For now as a clunky work-around, I'll type in "super.someMethod();" as the first line (even though I don't need it), click on the method name on that line, and hit F3.

I'm using Eclipse 3.4.1 (Ganymede) for Solaris.

like image 390
splungebob Avatar asked Jan 14 '13 19:01

splungebob


3 Answers

You can use the shortcut key: Alt + N, S

like image 104
Reimeus Avatar answered Sep 26 '22 22:09

Reimeus


There should be a little hollow arrow on the left of the method invocation line for the implementation of an interface method, and a little solid arrow on the left of the method invocation line for the implementation of a method override.

Left clicking on the hollow arrow takes you to the interface method.

Left clicking on the solid arrow takes you to the method that's overridden.

like image 37
Gilbert Le Blanc Avatar answered Sep 22 '22 22:09

Gilbert Le Blanc


I like Alt+N, S as Reimeus wrote. Another option that doesn't require your cursor to be in the function in question is to use the pop-up outline view:

  • Ctrl-O to open outline
  • Ctrl-O to show inherited members
  • Type method name to find it
like image 43
sharakan Avatar answered Sep 25 '22 22:09

sharakan