From fe8378aa3938111765c730e40edc1a5f380350dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Henning?= <stu114708@informatik.uni-kiel.de> Date: Mon, 20 Jun 2016 17:57:57 +0200 Subject: [PATCH] use getDepth() of vertices --- .../DotDependencyGraphConfigurationFactory.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/kieker/analysis/dev/dependencygraphs/DotDependencyGraphConfigurationFactory.java b/src/main/java/kieker/analysis/dev/dependencygraphs/DotDependencyGraphConfigurationFactory.java index ba16cdf9..690f2d9c 100644 --- a/src/main/java/kieker/analysis/dev/dependencygraphs/DotDependencyGraphConfigurationFactory.java +++ b/src/main/java/kieker/analysis/dev/dependencygraphs/DotDependencyGraphConfigurationFactory.java @@ -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(); } } -- GitLab