Search code examples
javaeclipseeclipse-plugineclipse-pdeeclipse-jdt

Get the number of method calls between java files


I'm writing an eclipse plug-in that needs to work on a java project to analyze inter-java-files method dependencies. I need to list the calls that one java file makes to all methods in all other java files (if any) ... Programmatically.

I thought of using Reflections, but then I will have to write my own parser to list the method calls. I'm sure eclipse has something I can use in order to achieve this, I just don't know what exactly to look for and I soon got lost in the weeds!

Any help please? Thanks!


Solution

  • Look at the JDT (java development toolkit) projects. Start with the IJavaProject and collaborating classes. You'll basically use these classes to get java-related information about the class path, implementations and references of java elements in a java project.