Eclipse“开放实现”,它位于超类中

时间:2013-12-12 11:57:45

标签: java eclipse

public interface Foo {
    public void bar();
}

public class FooBar {
    public void bar() {
    }
}

public class FooImpl extends FooBar implements Foo {
}

public class App {
    public static void main (String[] args) {
        Foo foo = new FooImpl();
        foo.bar();
    }
}

右键点击foo.bar - >开放实现,它不会显示,因为实现是在FooImpl的超类。

如果修改了FooImpl以直接实现该方法,则可以点击即可。或者,如果FooBar被标记为实现Foo,它也将起作用。

任何可用于更改此设置的设置,以便它可以使用类型层次结构来查找匹配项吗?

谢谢! 汤姆

1 个答案:

答案 0 :(得分:0)

按住超链接修改器(通常为Crl / Cmd),并用指针悬停在调用上。

相关问题