changeset 4573:24d9f3310ed6

Visualizer: Fix edge tooltip showing wrong node ids. GraalEdgeColorFilter: Don't change style of dashed lines.
author Andreas Woess <andreas.woess@jku.at>
date Sun, 12 Feb 2012 23:21:54 +0100
parents 76841bdd5f3e
children ab4a47b6a187
files src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/GraalEdgeColorFilter.java src/share/tools/IdealGraphVisualizer/Graph/src/com/sun/hotspot/igv/graph/Connection.java visualizer/Graal/src/com/sun/hotspot/igv/graal/filters/GraalEdgeColorFilter.java visualizer/Graph/src/com/sun/hotspot/igv/graph/Connection.java
diffstat 4 files changed, 16 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/GraalEdgeColorFilter.java	Sat Feb 11 23:35:44 2012 +0100
+++ b/src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/GraalEdgeColorFilter.java	Sun Feb 12 23:21:54 2012 +0100
@@ -35,7 +35,7 @@
 
 /**
  * Filter that colors usage and successor edges differently.
- * 
+ *
  * @author Peter Hofer
  */
 public class GraalEdgeColorFilter extends AbstractFilter {
@@ -77,7 +77,9 @@
                 for (Connection c : is.getConnections()) {
                     if (c.getLabel() == null || !c.getLabel().endsWith("#NDF")) {
                         c.setColor(color);
-                        c.setStyle(style);
+                        if (c.getStyle() != ConnectionStyle.DASHED) {
+                            c.setStyle(style);
+                        }
                     } else if ("EndNode".equals(c.getOutputSlot().getFigure().getProperties().get("class"))
                             || "EndNode".equals(c.getOutputSlot().getProperties().get("class"))) {
                         c.setColor(successorColor);
--- a/src/share/tools/IdealGraphVisualizer/Graph/src/com/sun/hotspot/igv/graph/Connection.java	Sat Feb 11 23:35:44 2012 +0100
+++ b/src/share/tools/IdealGraphVisualizer/Graph/src/com/sun/hotspot/igv/graph/Connection.java	Sun Feb 12 23:21:54 2012 +0100
@@ -32,7 +32,7 @@
 import java.util.List;
 
 /**
- * 
+ *
  * @author Thomas Wuerthinger
  */
 public class Connection implements Source.Provider, Link {
@@ -112,7 +112,7 @@
         outputSlot.getFigure().removeSuccessor(inputSlot.getFigure());
         outputSlot.connections.remove(this);
     }
-    
+
     public String getToolTipText() {
         StringBuilder builder = new StringBuilder();
         if (label != null) {
@@ -120,9 +120,9 @@
         } else {
             builder.append("From ");
         }
-        builder.append(getOutputSlot().getFigure());
+        builder.append(getOutputSlot().getFigure().getSource().getSourceNodes().get(0).getId());
         builder.append(" to ");
-        builder.append(getInputSlot().getFigure());
+        builder.append(getInputSlot().getFigure().getSource().getSourceNodes().get(0).getId());
         return builder.toString();
     }
 
--- a/visualizer/Graal/src/com/sun/hotspot/igv/graal/filters/GraalEdgeColorFilter.java	Sat Feb 11 23:35:44 2012 +0100
+++ b/visualizer/Graal/src/com/sun/hotspot/igv/graal/filters/GraalEdgeColorFilter.java	Sun Feb 12 23:21:54 2012 +0100
@@ -35,7 +35,7 @@
 
 /**
  * Filter that colors usage and successor edges differently.
- * 
+ *
  * @author Peter Hofer
  */
 public class GraalEdgeColorFilter extends AbstractFilter {
@@ -77,7 +77,9 @@
                 for (Connection c : is.getConnections()) {
                     if (c.getLabel() == null || !c.getLabel().endsWith("#NDF")) {
                         c.setColor(color);
-                        c.setStyle(style);
+                        if (c.getStyle() != ConnectionStyle.DASHED) {
+                            c.setStyle(style);
+                        }
                     } else if ("EndNode".equals(c.getOutputSlot().getFigure().getProperties().get("class"))
                             || "EndNode".equals(c.getOutputSlot().getProperties().get("class"))) {
                         c.setColor(successorColor);
--- a/visualizer/Graph/src/com/sun/hotspot/igv/graph/Connection.java	Sat Feb 11 23:35:44 2012 +0100
+++ b/visualizer/Graph/src/com/sun/hotspot/igv/graph/Connection.java	Sun Feb 12 23:21:54 2012 +0100
@@ -32,7 +32,7 @@
 import java.util.List;
 
 /**
- * 
+ *
  * @author Thomas Wuerthinger
  */
 public class Connection implements Source.Provider, Link {
@@ -112,7 +112,7 @@
         outputSlot.getFigure().removeSuccessor(inputSlot.getFigure());
         outputSlot.connections.remove(this);
     }
-    
+
     public String getToolTipText() {
         StringBuilder builder = new StringBuilder();
         if (label != null) {
@@ -120,9 +120,9 @@
         } else {
             builder.append("From ");
         }
-        builder.append(getOutputSlot().getFigure());
+        builder.append(getOutputSlot().getFigure().getSource().getSourceNodes().get(0).getId());
         builder.append(" to ");
-        builder.append(getInputSlot().getFigure());
+        builder.append(getInputSlot().getFigure().getSource().getSourceNodes().get(0).getId());
         return builder.toString();
     }