Is there an Eclipse plug-in, or some other tool or technique that would search an entire Java project (and/or the entire workspace) and reveal (in list/sortable format) the frequency-of-invocation of all public methods in the project? That is "what code is using what other code" the most?
I'm very familiar with the CTRL-SHIFT-G or CTRL-G usage; use it all the time. I'm also familiar with the Call Hierarchy view. The result that I'm looking for could be described like doing Search > References > Workspace (CTRL-SHIFT-G) on every method in every class in the workspace and tallying/counting the number of results each time, with final, sortable output like the example below.
The notion above is to get an idea of which classes/methods are getting most-used (not at run-time; in this question "used" != "executed"), in order to prioritize unit-testing on a very large project. I want to start using JUnit more (more than not-at-all, that is), and the idea of finding the most-used methods seemed like a good place to start.
For example, given three classes, ClassA
, ClassB
, and ClassC
, I'd like a summary similar to this:
Method Number of calls ClassB.methodThatDoesSomethingMundane() 134 ClassC.methodThatDoesCoolStuff() 78 ClassC.methodThatDoesImportantThing() 71 ClassA.constructor() 63 ClassB.aDifferentBoringMethod() 37 ClassA.getSomething() 19 ... etc ...