Skip to content
Snippets Groups Projects
Commit fe8378aa authored by Sören Henning's avatar Sören Henning
Browse files

use getDepth() of vertices

parent 063d49a3
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,9 @@ public class DotDependencyGraphConfigurationFactory {
DotExportConfiguration configuration = new DotExportConfiguration();
configuration.addGraphAttribute(DotGraphAttribute.RANKDIR, g -> "LR");
configuration.addEdgeAttribute(DotEdgeAttribute.LABEL, (e -> e.getProperty("calls").toString()));
configuration.addDefaultNodeAttribute(DotNodeAttribute.SHAPE, g -> "box");
configuration.addNodeAttribute(DotNodeAttribute.LABEL, new VertexLabelMapper("<<assembly component>>"));
return configuration;
......@@ -29,7 +31,9 @@ public class DotDependencyGraphConfigurationFactory {
DotExportConfiguration configuration = new DotExportConfiguration();
configuration.addGraphAttribute(DotGraphAttribute.RANKDIR, g -> "LR");
configuration.addEdgeAttribute(DotEdgeAttribute.LABEL, (e -> e.getProperty("calls").toString()));
configuration.addDefaultNodeAttribute(DotNodeAttribute.SHAPE, g -> "oval");
configuration.addClusterAttribute(DotClusterAttribute.LABEL, new ClusterLabelMapper("<<assembly component>>"));
configuration.addNodeAttribute(DotNodeAttribute.LABEL, new VertexLabelMapper());
......@@ -137,9 +141,7 @@ public class DotDependencyGraphConfigurationFactory {
@Override
public String apply(final Vertex vertex) {
// TODO Get "level" of this vertex
return this.annotations.get(0) + "\\n" + vertex.getProperty("Name").toString();
return this.annotations.get(vertex.getDepth()) + "\\n" + vertex.getProperty("Name").toString();
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment