views:

633

answers:

9

I am currently refactoring a large Java application. I have split up one of the central (Eclipse) projects into about 30 individual "components", however they are still heavily inter-dependent. In order to get a better idea of what depends on what I am looking for some way to graph the compile time dependencies.

All tools I have found so far are capable of graphing package or class dependencies or the dependencies between Eclipse plugins, however what I have in mind should just take a look at the classpath settings for each Eclipse project and build a coarser grained graph from that.

Later I will then go deeper, however right now this would just mean I would not be able to see the forest for all of the trees.

+3  A: 

One tool that I believe would do what you want is Understand. It's not free, but you can download a free trial edition before investing any money into it.

MattK
+1  A: 

I am not sure if there is a(n Eclipse) classpath analysis tool.
May be Understand mentioned by MattK can help.

The closest I would pick amongst all the static code analysis tool referenced here would be JarAnalyzer (no graph though), able to detect "Physical dependencies" amongst jars.

VonC
+5  A: 

Check out JBoss Tattletale. It might not do all you ask but it's worth checking out. It's still relatively new though.

The tool will provide you with reports that can help you

  • Identify dependencies between JAR files
  • Find missing classes from the classpath
  • Spot if a class is located in multiple JAR files
  • Spot if the same JAR file is located in multiple locations
  • With a list of what each JAR file requires and provides
  • Verify the SerialVersionUID of a class
  • Find similar JAR files that have different version numbers
  • Find JAR files without a version number
  • Locate a class in a JAR file
  • Get the OSGi status of your project
  • Remove black listed API usage
Peter D
+1  A: 

Take a look at Dependency Finder

Suresh Kumar
A: 

Thanks for all the responses, for now I resorted to a very simple handcrafted program that reads the ".classpath" files and spits out a GraphViz script. This allows for all sorts of quick changes to accomodate the "needs of the hour".

Daniel Schneller
A: 

As far as I know, there is no such visualization tool at the moment, but I suspect it would be a breeze to implement such a dependency visualizer in JDT using Zest.

Not to mention that it would make a great extension for Eclipse :)

Roland Tepp
+2  A: 

Structure101 is capable of visualizing class and method JAR level dependencies in Jboss 5.

See the screenshot below or view it larger.

alt text

pth
A: 

for the record (and for improving this knowledge base), I found Shrimp very helpful: http://www.thechiselgroup.org/shrimp

Shrimp-Visualization

Also, for easy dependency-checking, Byecycle is worth a try, but seems not to be updated anymore: Byecycle

Both tools also offer Eclipse integration.

Gregor
A: 

See my blog post for a very simple Eclipse plug-in showing project dependencies using Zest.

Anders Forsell