Faculty of Information Technology
Software Engineering Group

Q&D way to visualize package dependencies

...using GraphViz

Smalltalk loadPackage: 'squeak:graphviz'

p := #'stx:libjava'. "The package which dependencies should be visualized"

gv := GraphViz new beDirected.
(ProjectDefinition definitionClassForPackage: p) preRequisites do:[:eachName |
    gv add: p -> eachName.
(ProjectDefinition definitionClassForPackage: p)  allPreRequisites do:[:eachName |
    | each |
    each := ProjectDefinition definitionClassForPackage: eachName.
    each effectivePreRequisites do:[:e |
        e ~~ #'stx:libbasic' ifTrue:[
            gv add: eachName -> e.
gv openInWindow.

The squeak:graphvz is distributed with Smalltalk/X jv-branch

Last modified 6 years ago Last modified on Oct 4, 2015, 8:58:37 AM