]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.graphviz/scl/Visualization/ModuleDependencyGraph.scl
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.graphviz / scl / Visualization / ModuleDependencyGraph.scl
1 import "Reflection" (moduleDependencyGraph)\r
2 import "Visualization/GGraph"\r
3 \r
4 showModuleDependencyGraph :: <Proc> ()\r
5 showModuleDependencyGraph = do\r
6     graph = newGGraph [Rankdir "LR"] $ \r -> [Label r, Shape "rect"]\r
7     for moduleDependencyGraph $ \(moduleName, deps) ->\r
8         for (filter interestingDependency deps) $ \(depModuleName, localName, importSpec) ->\r
9             newGEdge graph moduleName depModuleName []\r
10     showGGraph graph\r
11   where\r
12     interestingDependency (moduleName, localName, importSpec) = not (startsWith moduleName "http:") && localName != Nothing