简体   繁体   中英

Java IDE - find all INDIRECT usages/references of a function or class?

In Netbeans or in Eclipse, you can use "Find Usages" or "References" from the right click context menu. If a() calls b(), using the functionality from b() will show you a(). However, what I want is to be able to see some kind of tree or have an option to see all usages of a given/class or method, such that if z() calls a() that using the functionality will show both z() and a().

Any IDE plugins or external tools that can do this?

Eclipse gives you a way to see Call hierarchy using Ctrl+ Alt + H or choose from the menu like references. This should show you the entire call tree for this method.

Use PMD or CheckStyle and have it construct an abstract syntax tree. You can then use that to find indirect usages/references.

如果使用Eclipse,请查看“调用层次结构”视图。

Check out nWire for Java . It shows all the code associations in one view, which can be further expanded and explored.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM