3

Is there any sort of support in Eclipse whereby I can programatically generate a static call graph for a single method in a class, at build time?

I would like to be able to determine all of the methods that may be potentially called from a given class method.

I am not interested in a visual graph. I'm looking for an API. It doesn't even have to be Eclipse.

2 Answers 2

4

Eclipse has something called a Call Hierarchy. Highlight your method, right click and select Open Call Hierarchy. In addition in Windows you can use the keyboard shortcut CTRL+ALT+H.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for this. Do you know if this is available via an API?
Take a look at this SO question and see if it helps: stackoverflow.com/questions/5321290/…
2

Call heirarchy and call graph are different. Eclipse "Call Heirarchy" will provide backward trace. Where Call graph is forward trace. "Modal goon" plugin provides this feature.

1 Comment

Call Hierarchy provides forward trace as well. Click the "Show Callees" button. help.eclipse.org/juno/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.