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?
Select mymethod() and press ctrl + alt + h . To see some detailed Information about any method you can use this by selecting that particular Object or method and right click. you can see the "OpenCallHierarchy" ( Ctrl + Alt + H ).
It should be displayed by default in the Java perspective (which I assume you are using), but if you don't see it, you can display it from Window->Show View->Outline .
To find the references of a method, eclipse has a plugin called Open Call Hierarchy(Ctrl+Alt+H).
Press Alt + Left Arrow and Alt + Right Arrow like you would in a web browser.
Click on the method name, then press Ctrl+Alt+H to bring up the Call Hierarchy view.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With