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.
您可以使用快捷键: Alt + N,S
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.
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 是:将鼠标悬停在方法名称上,按住CTRL键,然后从出现的菜单中选择“打开超级实施”
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.