X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.graphviz%2Fscl%2FVisualization%2FModuleDependencyGraph.scl;fp=bundles%2Forg.simantics.graphviz%2Fscl%2FVisualization%2FModuleDependencyGraph.scl;h=ff73c5ae232d8f8055db1fc29c3c887428fc70d2;hb=969bd23cab98a79ca9101af33334000879fb60c5;hp=0000000000000000000000000000000000000000;hpb=866dba5cd5a3929bbeae85991796acb212338a08;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.graphviz/scl/Visualization/ModuleDependencyGraph.scl b/bundles/org.simantics.graphviz/scl/Visualization/ModuleDependencyGraph.scl new file mode 100644 index 000000000..ff73c5ae2 --- /dev/null +++ b/bundles/org.simantics.graphviz/scl/Visualization/ModuleDependencyGraph.scl @@ -0,0 +1,12 @@ +import "Reflection" (moduleDependencyGraph) +import "Visualization/GGraph" + +showModuleDependencyGraph :: () +showModuleDependencyGraph = do + graph = newGGraph [Rankdir "LR"] $ \r -> [Label r, Shape "rect"] + for moduleDependencyGraph $ \(moduleName, deps) -> + for (filter interestingDependency deps) $ \(depModuleName, localName, importSpec) -> + newGEdge graph moduleName depModuleName [] + showGGraph graph + where + interestingDependency (moduleName, localName, importSpec) = not (startsWith moduleName "http:") && localName != Nothing \ No newline at end of file