更多智能Eclipse“打开呼叫层次”? [英] More Intelligent Eclipse "Open Call Hierarchy"?

查看:157
本文介绍了更多智能Eclipse“打开呼叫层次”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我在Eclipse中有一个Java项目,我可以右键单击方法名称和打开呼叫层次结构。假设我有两个接口A和B,它们都指定一个方法x()。我可以以更智能的方式让Eclipse使用打开呼叫层次结构,以便只显示来自A的x()调用,而不显示来自B的那些调用?

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(). Is it possible for me to have Eclipse use "Open Call Hierarchy" in a more intelligent way so as to only show calls to x() from A's while not showing those from B's?

推荐答案

Eclipse应该已经这样做了。如果要测试,请转到您的 A 界面,选择 x()方法并运行打开呼叫层次结构。在 B 接口中为您的 x()方法也一样。你应该得到不同的代码位置,除非你有一个实现两者的类,你不应该这样做。这样做不会破坏任何编译或执行,你只会双重声明相同的方法签名。

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.

这篇关于更多智能Eclipse“打开呼叫层次”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆