How to see from where a public method is called in Eclipse using Java?

Jonas picture Jonas · Oct 1, 2010 · Viewed 50.3k times · Source

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?

Answer

Jon Skeet picture Jon Skeet · Oct 1, 2010

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