views:

63

answers:

3

I am working on a Java project in Eclipse. Sometimes when I do refactoring I would like to see from what other classes a public method is called.

There is a primitive way to do this, that I am using now. I can comment out the method and see in what classes there is an error in Eclipse. Is there any better way to do this in Eclipse? E.g. by selecting the method signature and run a command by a key-shortcut?

+5  A: 

Click on the method name, then press Ctrl+Alt+H to bring up the Call Hierarchy view.

Jon Skeet
+3  A: 

Search > References > Workspace

This will build a tree of results in the search view of every reference to the method. The hotkey is Shift+Ctrl+G

unholysampler
+1  A: 

You can also use Ctrl+Shift+G for "Find References in Workspace"

abyx