[英]In Eclipse, is it possible to find, where, a certain function, class or variable is called?
When you want to open the declaration of a class/function/variable in java you can press Ctrl and click on it, but is there are way to go the other way round? 当您想在Java中打开类/函数/变量的声明时,可以按Ctrl并单击它,但是还有其他方法吗? If you had to find all instances where a function or variable is called how would you quickly get that?
如果必须查找所有调用了函数或变量的实例,您将如何快速获得该实例?
Ctrl + Alt + H向您显示使用或调用变量或方法的所有位置。
On both Windows and Mac, right-click the method, and choose "Open Call Hierarchy." 在Windows和Mac上,右键单击该方法,然后选择“打开呼叫层次结构”。
You can use this for identifiers other than methods. 您可以将其用于方法以外的其他标识符。 For example, if a class does not have an explicit constructor, you can use this to find all the callers of its default constructor.
例如,如果一个类没有显式的构造函数,则可以使用它来查找其默认构造函数的所有调用方。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.