More Intelligent Eclipse “Open Call Hierarchy”?

前端 未结 3 764
闹比i
闹比i 2020-12-20 20:56

If I have a Java project in Eclipse, I can right-click on a method name and \"Open Call Hierarchy.\" Suppose I have two interfaces, A and B, that both specify a method x().

3条回答
  •  一向
    一向 (楼主)
    2020-12-20 21:44

    Eclipse should already do this. If you want to test it, go to your A interface, select the x() method and run 'Open Call Hierarchy' on it. Do the same for your x() method in interface B. You should get different code locations, unless you have a class which implements both, which you should never do. Doing so won't break any compilation or execution, you will just be doubly declaring the same method signature.

提交回复
热议问题