diff src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/FolderNode.java @ 4175:ea49d7abeb05

IdealGraphVisualizer bugfixes: * When removing graphs, ensure that the position indices in the range slider remain valid (although they might represent different graphs afterwards) * Instead of removing the last remaining graph of a group, remove the entire group. This prevents problems in some components that assume that a group always has at least one graph.
author Peter Hofer <peter.hofer@jku.at>
date Mon, 02 Jan 2012 14:21:07 +0100
parents b1280fa5b535
children 2e66f6fd4bc9
line wrap: on
line diff
--- a/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/FolderNode.java	Thu Dec 29 16:07:35 2011 -0800
+++ b/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/FolderNode.java	Mon Jan 02 14:21:07 2012 +0100
@@ -56,7 +56,7 @@
 
         private FolderNode parent;
         private List<Group> registeredGroups;
-        private GraphDocument document;
+        private final GraphDocument document;
 
         public FolderChildren(GraphDocument document) {
             this.document = document;
@@ -80,7 +80,7 @@
                 List<Node> curNodes = new ArrayList<Node>();
                 for (Group g : p.getRight()) {
                     for (InputGraph graph : g.getGraphListCopy()) {
-                        curNodes.add(new GraphNode(graph));
+                        curNodes.add(new GraphNode(document, graph));
                     }
                     g.getChangedEvent().addListener(this);
                     registeredGroups.add(g);