views:

41

answers:

4

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?

+2  A: 

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.

Fazal
Thanks! Any idea if this is supported in Netbeans?
GreenieMeanie
Well my knowledge is only base don google search for netbeans :). I think if you right click on any method it shows you call heirachy option...
Fazal
A: 

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

Kelly French
A: 

If you use Eclipse, take a look at the Call Hierarchy view.

Uri
A: 

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

zvikico