Friday, December 11, 2009

Project and Bundle Dependency Graphs

STAN IDE 2.0 introduces tools to visualize Eclipse project and OSGi bundle dependencies. The tools are packaged into additional, optional features
  • STAN IDE Tools (project dependencies)
  • STAN IDE Tools - PDE (bundle dependencies)
Once installed, the project/bundle dependencies are available from Window > Show View in category STAN Tools:

Both views follow the same usage patterns. Let's take some project dependencies as an example. Just drag and drop projects from Eclipse' Package (or Project) Explorer to add them to the graph.
OK, what's about the "+" and "-" overlay icons?
  • A "+" indicates that there are outgoing dependencies that are currently not shown. These dependencies can be added by double clicking the node. E.g. adding outgoing dependencies for de.odysseus.stan.eclipse.coverage.core may give
  • A "-" indicates that there are incoming dependencies that are currently not shown. These dependencies can be added by double clicking the node while holding the ALT key. E.g. adding incoming dependencies for de.odysseus.stan.eclipse.coverage.core may give
Here's what the edge labels mean:
  • For project dependencies, edges may be labeled "s" (static), "d" (dynamic) or "s+d" (both). A "static" dependency can be added on the "Project References" page in the project's properties. A "dynamic" dependency is introduced through Java Build Path, Java EE Module Dependencies, etc.
  • For bundle dependencies, edges may be labeled "r" (requires bundle), "i" (imports packages), or "i+r" (both). Fragments may also have an "h" (is hosted by) dependency to their host bundle.
Both views also let you remove selected nodes by simply pressing the DEL key.

As a final example, here are the outgoing (transitive) bundle dependencies for org.eclipse.core.runtime:
By the way, use the "+" button from the view's toolbar to add bundles from your active target platform.
Hope you like it!