Skip to content

Commit

Permalink
minor improvements to import graph
Browse files Browse the repository at this point in the history
  • Loading branch information
jurgenvinju committed Sep 24, 2024
1 parent 0abb4fa commit 7d1fdbe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/org/rascalmpl/library/lang/rascal/vis/ImportGraph.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ void importGraph(PathConfig pcfg, bool hideExternals=true) {
// let's start with a simple graph and elaborate on details in later versions
g = { <from, "I", to> | <from, to> <- m.imports, hideExternals ==> to notin m.external}
+ { <from, "E", to> | <from, to> <- m.extends, hideExternals ==> to notin m.external}
+ { <"_", "_", to> | to <- top(m.imports + m.extends) } // pull up the top modules
+ { <from, "x", "x"> | from <- bottom(m.imports + m.extends), hideExternals ==> from notin m.external} // pull the bottom modules down.
// + { <"_", "_", to> | to <- top(m.imports + m.extends) } // pull up the top modules
// + { <from, "x", "x"> | from <- bottom(m.imports + m.extends), hideExternals ==> from notin m.external} // pull the bottom modules down.
;

loc modLinker(str name) {
Expand All @@ -59,7 +59,7 @@ void importGraph(PathConfig pcfg, bool hideExternals=true) {

default loc modLinker(value _) = |nothing:///|;

showInteractiveContent(graph(g, \layout=defaultDagreLayout(), nodeLinker=modLinker), title="Rascal Import/Extend Graph");
showInteractiveContent(graph(g, \layout=defaultDagreLayout(), nodeLinker=modLinker), title="Rascal Import/Extend Graph", edgeStyle=defaultEdgeStyle()[\curve-style=taxi()]);
}

@synopsis{Container for everything we need to know about the modules in a project to visualize it.}
Expand Down
2 changes: 1 addition & 1 deletion src/org/rascalmpl/library/vis/Graphs.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ data CytoLayout(CytoLayoutName name = dagre(), bool animate=false)
CytoLayoutName name = CytoLayoutName::breadthfirst(),
num spacingFactor= 1,
list[str] roots = [],
bool circle=false,
bool circle=faculse,
bool grid=!circle,
bool directed=false
)
Expand Down

0 comments on commit 7d1fdbe

Please sign in to comment.