changeset 4390:6a28db4be804

Removed CFG view and related concepts from IGV.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Sat, 28 Jan 2012 16:07:06 +0100
parents 6ffa3413096e
children 2b2ac41e70dd
files src/share/tools/IdealGraphVisualizer/ControlFlow/build.xml src/share/tools/IdealGraphVisualizer/ControlFlow/manifest.mf src/share/tools/IdealGraphVisualizer/ControlFlow/nbproject/build-impl.xml src/share/tools/IdealGraphVisualizer/ControlFlow/nbproject/genfiles.properties src/share/tools/IdealGraphVisualizer/ControlFlow/nbproject/platform.properties src/share/tools/IdealGraphVisualizer/ControlFlow/nbproject/project.properties src/share/tools/IdealGraphVisualizer/ControlFlow/nbproject/project.xml src/share/tools/IdealGraphVisualizer/ControlFlow/nbproject/suite.properties src/share/tools/IdealGraphVisualizer/Graph/src/com/sun/hotspot/igv/graph/Block.java src/share/tools/IdealGraphVisualizer/Graph/src/com/sun/hotspot/igv/graph/Diagram.java src/share/tools/IdealGraphVisualizer/Graph/src/com/sun/hotspot/igv/graph/Figure.java src/share/tools/IdealGraphVisualizer/Layout/src/com/sun/hotspot/igv/layout/Cluster.java src/share/tools/IdealGraphVisualizer/Layout/src/com/sun/hotspot/igv/layout/LayoutGraph.java src/share/tools/IdealGraphVisualizer/Layout/src/com/sun/hotspot/igv/layout/Vertex.java src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/DiagramScene.java src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/DiagramViewModel.java src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/EditorTopComponent.java src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/actions/EnableBlockLayoutAction.java src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/widgets/BlockWidget.java src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/widgets/FigureWidget.java src/share/tools/IdealGraphVisualizer/nbproject/project.properties
diffstat 21 files changed, 1 insertions(+), 619 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/tools/IdealGraphVisualizer/ControlFlow/build.xml	Sat Jan 28 15:48:40 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
-<!-- for some information on what you could do (e.g. targets to override). -->
-<!-- If you delete this file and reopen the project it will be recreated. -->
-<project name="com.sun.hotspot.igv.controlflow" default="netbeans" basedir=".">
-    <description>Builds, tests, and runs the project com.sun.hotspot.igv.controlflow.</description>
-    <import file="nbproject/build-impl.xml"/>
-</project>
--- a/src/share/tools/IdealGraphVisualizer/ControlFlow/manifest.mf	Sat Jan 28 15:48:40 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-Manifest-Version: 1.0
-OpenIDE-Module: com.sun.hotspot.igv.controlflow
-OpenIDE-Module-Layer: com/sun/hotspot/igv/controlflow/layer.xml
-OpenIDE-Module-Localizing-Bundle: com/sun/hotspot/igv/controlflow/Bundle.properties
-OpenIDE-Module-Specification-Version: 1.0
-
--- a/src/share/tools/IdealGraphVisualizer/ControlFlow/nbproject/build-impl.xml	Sat Jan 28 15:48:40 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-*** GENERATED FROM project.xml - DO NOT EDIT  ***
-***         EDIT ../build.xml INSTEAD         ***
--->
-<project name="com.sun.hotspot.igv.controlflow-impl" basedir="..">
-    <property file="nbproject/private/suite-private.properties"/>
-    <property file="nbproject/suite.properties"/>
-    <fail unless="suite.dir">You must set 'suite.dir' to point to your containing module suite</fail>
-    <property file="${suite.dir}/nbproject/private/platform-private.properties"/>
-    <property file="${suite.dir}/nbproject/platform.properties"/>
-    <macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
-        <attribute name="name"/>
-        <attribute name="value"/>
-        <sequential>
-            <property name="@{name}" value="${@{value}}"/>
-        </sequential>
-    </macrodef>
-    <property file="${user.properties.file}"/>
-    <nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
-    <nbmproject2:property name="netbeans.dest.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
-    <fail message="You must define 'nbplatform.${nbplatform.active}.harness.dir'">
-        <condition>
-            <not>
-                <available file="${harness.dir}" type="dir"/>
-            </not>
-        </condition>
-    </fail>
-    <import file="${harness.dir}/build.xml"/>
-</project>
--- a/src/share/tools/IdealGraphVisualizer/ControlFlow/nbproject/genfiles.properties	Sat Jan 28 15:48:40 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-build.xml.data.CRC32=b524efb3
-build.xml.script.CRC32=79a27be9
-build.xml.stylesheet.CRC32=79c3b980
-# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
-# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
-nbproject/build-impl.xml.data.CRC32=b524efb3
-nbproject/build-impl.xml.script.CRC32=582bdab7
-nbproject/build-impl.xml.stylesheet.CRC32=deb65f65
--- a/src/share/tools/IdealGraphVisualizer/ControlFlow/nbproject/platform.properties	Sat Jan 28 15:48:40 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-# Deprecated since 5.0u1; for compatibility with 5.0:
-disabled.clusters=\
-    apisupport1,\
-    harness,\
-    ide8,\
-    java1,\
-    nb6.0,\
-    profiler2
-disabled.modules=\
-    org.netbeans.core.execution,\
-    org.netbeans.core.multiview,\
-    org.netbeans.core.output2,\
-    org.netbeans.modules.applemenu,\
-    org.netbeans.modules.autoupdate.services,\
-    org.netbeans.modules.autoupdate.ui,\
-    org.netbeans.modules.core.kit,\
-    org.netbeans.modules.favorites,\
-    org.netbeans.modules.javahelp,\
-    org.netbeans.modules.masterfs,\
-    org.netbeans.modules.options.keymap,\
-    org.netbeans.modules.sendopts,\
-    org.netbeans.modules.templates,\
-    org.openide.compat,\
-    org.openide.execution,\
-    org.openide.util.enumerations
-enabled.clusters=\
-    platform7
-nbjdk.active=JDK_1.6
-nbplatform.active=default
--- a/src/share/tools/IdealGraphVisualizer/ControlFlow/nbproject/project.properties	Sat Jan 28 15:48:40 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-javac.source=1.7
-javac.compilerargs=-Xlint -Xlint:-serial
--- a/src/share/tools/IdealGraphVisualizer/ControlFlow/nbproject/project.xml	Sat Jan 28 15:48:40 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://www.netbeans.org/ns/project/1">
-    <type>org.netbeans.modules.apisupport.project</type>
-    <configuration>
-        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
-            <code-name-base>com.sun.hotspot.igv.controlflow</code-name-base>
-            <suite-component/>
-            <module-dependencies>
-                <dependency>
-                    <code-name-base>com.sun.hotspot.igv.data</code-name-base>
-                    <build-prerequisite/>
-                    <compile-dependency/>
-                    <run-dependency>
-                        <specification-version>1.0</specification-version>
-                    </run-dependency>
-                </dependency>
-                <dependency>
-                    <code-name-base>com.sun.hotspot.igv.hierarchicallayout</code-name-base>
-                    <build-prerequisite/>
-                    <compile-dependency/>
-                    <run-dependency>
-                        <specification-version>1.0</specification-version>
-                    </run-dependency>
-                </dependency>
-                <dependency>
-                    <code-name-base>com.sun.hotspot.igv.layout</code-name-base>
-                    <build-prerequisite/>
-                    <compile-dependency/>
-                    <run-dependency>
-                        <specification-version>1.0</specification-version>
-                    </run-dependency>
-                </dependency>
-                <dependency>
-                    <code-name-base>com.sun.hotspot.igv.util</code-name-base>
-                    <build-prerequisite/>
-                    <compile-dependency/>
-                    <run-dependency>
-                        <specification-version>1.0</specification-version>
-                    </run-dependency>
-                </dependency>
-                <dependency>
-                    <code-name-base>org.jdesktop.layout</code-name-base>
-                    <build-prerequisite/>
-                    <compile-dependency/>
-                    <run-dependency>
-                        <release-version>1</release-version>
-                        <specification-version>1.16.1</specification-version>
-                    </run-dependency>
-                </dependency>
-                <dependency>
-                    <code-name-base>org.netbeans.api.visual</code-name-base>
-                    <build-prerequisite/>
-                    <compile-dependency/>
-                    <run-dependency>
-                        <specification-version>2.9</specification-version>
-                    </run-dependency>
-                </dependency>
-                <dependency>
-                    <code-name-base>org.openide.util</code-name-base>
-                    <build-prerequisite/>
-                    <compile-dependency/>
-                    <run-dependency>
-                        <specification-version>8.14.1</specification-version>
-                    </run-dependency>
-                </dependency>
-                <dependency>
-                    <code-name-base>org.openide.util.lookup</code-name-base>
-                    <build-prerequisite/>
-                    <compile-dependency/>
-                    <run-dependency>
-                        <specification-version>8.6.1</specification-version>
-                    </run-dependency>
-                </dependency>
-                <dependency>
-                    <code-name-base>org.openide.windows</code-name-base>
-                    <build-prerequisite/>
-                    <compile-dependency/>
-                    <run-dependency>
-                        <specification-version>6.16</specification-version>
-                    </run-dependency>
-                </dependency>
-            </module-dependencies>
-            <public-packages/>
-        </data>
-    </configuration>
-</project>
--- a/src/share/tools/IdealGraphVisualizer/ControlFlow/nbproject/suite.properties	Sat Jan 28 15:48:40 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-suite.dir=${basedir}/..
--- a/src/share/tools/IdealGraphVisualizer/Graph/src/com/sun/hotspot/igv/graph/Block.java	Sat Jan 28 15:48:40 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-package com.sun.hotspot.igv.graph;
-
-import com.sun.hotspot.igv.data.InputBlock;
-import com.sun.hotspot.igv.layout.Cluster;
-import java.awt.Rectangle;
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- *
- * @author Thomas Wuerthinger
- */
-public class Block implements Cluster {
-
-    private InputBlock inputBlock;
-    private Rectangle bounds;
-    private Diagram diagram;
-
-    public Block(InputBlock inputBlock, Diagram diagram) {
-        this.inputBlock = inputBlock;
-        this.diagram = diagram;
-    }
-
-    @Override
-    public Cluster getOuter() {
-        return null;
-    }
-
-    public InputBlock getInputBlock() {
-        return inputBlock;
-    }
-
-    @Override
-    public Set<? extends Cluster> getSuccessors() {
-        Set<Block> succs = new HashSet<>();
-        for (InputBlock b : inputBlock.getSuccessors()) {
-            succs.add(diagram.getBlock(b));
-        }
-        return succs;
-    }
-
-    @Override
-    public void setBounds(Rectangle r) {
-        this.bounds = r;
-    }
-
-    @Override
-    public Rectangle getBounds() {
-        return bounds;
-    }
-
-    @Override
-    public int compareTo(Cluster o) {
-        return toString().compareTo(o.toString());
-    }
-
-    @Override
-    public String toString() {
-        return inputBlock.getName();
-    }
-}
-    
--- a/src/share/tools/IdealGraphVisualizer/Graph/src/com/sun/hotspot/igv/graph/Diagram.java	Sat Jan 28 15:48:40 2012 +0100
+++ b/src/share/tools/IdealGraphVisualizer/Graph/src/com/sun/hotspot/igv/graph/Diagram.java	Sat Jan 28 16:07:06 2012 +0100
@@ -49,7 +49,6 @@
 public class Diagram {
 
     private List<Figure> figures;
-    private Map<InputBlock, Block> blocks;
     private InputGraph graph;
     private int curId;
     private String nodeText;
@@ -66,37 +65,19 @@
     
     private Diagram() {
         figures = new ArrayList<>();
-        blocks = new LinkedHashMap<>(8);
         this.nodeText = "";
         this.font = new Font("Arial", Font.PLAIN, 13);
         this.slotFont = new Font("Arial", Font.PLAIN, 10);
     }
 
-    public Block getBlock(InputBlock b) {
-        assert blocks.containsKey(b);
-        return blocks.get(b);
-    }
-
     public String getNodeText() {
         return nodeText;
     }
 
-    public void updateBlocks() {
-        blocks.clear();
-        for (InputBlock b : graph.getBlocks()) {
-            Block curBlock = new Block(b, this);
-            blocks.put(b, curBlock);
-        }
-    }
-
     public Diagram getNext() {
         return Diagram.createDiagram(graph.getNext(), nodeText);
     }
 
-    public Collection<Block> getBlocks() {
-        return Collections.unmodifiableCollection(blocks.values());
-    }
-
     public Diagram getPrev() {
         return Diagram.createDiagram(graph.getPrev(), nodeText);
     }
@@ -143,8 +124,6 @@
         d.graph = graph;
         d.nodeText = nodeText;
 
-        d.updateBlocks();
-
         Collection<InputNode> nodes = graph.getNodes();
         Hashtable<Integer, Figure> figureHash = new Hashtable<>();
         for (InputNode n : nodes) {
--- a/src/share/tools/IdealGraphVisualizer/Graph/src/com/sun/hotspot/igv/graph/Figure.java	Sat Jan 28 15:48:40 2012 +0100
+++ b/src/share/tools/IdealGraphVisualizer/Graph/src/com/sun/hotspot/igv/graph/Figure.java	Sat Jan 28 16:07:06 2012 +0100
@@ -26,7 +26,6 @@
 import com.sun.hotspot.igv.data.InputBlock;
 import com.sun.hotspot.igv.data.Source;
 import com.sun.hotspot.igv.data.InputNode;
-import com.sun.hotspot.igv.layout.Cluster;
 import com.sun.hotspot.igv.layout.Vertex;
 import com.sun.hotspot.igv.data.Properties;
 import java.awt.*;
@@ -340,20 +339,6 @@
     }
 
     @Override
-    public Cluster getCluster() {
-        if (getSource().getSourceNodes().size() == 0) {
-            assert false : "Should never reach here, every figure must have at least one source node!";
-            return null;
-        } else {
-            final InputBlock inputBlock = diagram.getGraph().getBlock(getSource().getSourceNodes().get(0));
-            assert inputBlock != null;
-            Cluster result = diagram.getBlock(inputBlock);
-            assert result != null;
-            return result;
-        }
-    }
-
-    @Override
     public boolean isRoot() {
   
         List<InputNode> sourceNodes = source.getSourceNodes();
--- a/src/share/tools/IdealGraphVisualizer/Layout/src/com/sun/hotspot/igv/layout/Cluster.java	Sat Jan 28 15:48:40 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-package com.sun.hotspot.igv.layout;
-
-import java.awt.Rectangle;
-import java.util.Set;
-
-/**
- *
- * @author Thomas Wuerthinger
- */
-public interface Cluster extends Comparable<Cluster> {
-
-    public Cluster getOuter();
-    
-    public Rectangle getBounds();
-
-    public void setBounds(Rectangle r);
-
-    public Set<? extends Cluster> getSuccessors();
-}
--- a/src/share/tools/IdealGraphVisualizer/Layout/src/com/sun/hotspot/igv/layout/LayoutGraph.java	Sat Jan 28 15:48:40 2012 +0100
+++ b/src/share/tools/IdealGraphVisualizer/Layout/src/com/sun/hotspot/igv/layout/LayoutGraph.java	Sat Jan 28 16:07:06 2012 +0100
@@ -187,16 +187,4 @@
     public Set<Vertex> findRootVertices() {
         return findRootVertices(new HashSet<Vertex>());
     }
-
-    public SortedSet<Cluster> getClusters() {
-
-        SortedSet<Cluster> clusters = new TreeSet<>();
-        for (Vertex v : getVertices()) {
-            if (v.getCluster() != null) {
-                clusters.add(v.getCluster());
-            }
-        }
-
-        return clusters;
-    }
 }
--- a/src/share/tools/IdealGraphVisualizer/Layout/src/com/sun/hotspot/igv/layout/Vertex.java	Sat Jan 28 15:48:40 2012 +0100
+++ b/src/share/tools/IdealGraphVisualizer/Layout/src/com/sun/hotspot/igv/layout/Vertex.java	Sat Jan 28 16:07:06 2012 +0100
@@ -32,8 +32,6 @@
  */
 public interface Vertex extends Comparable<Vertex> {
 
-    public Cluster getCluster();
-
     public Dimension getSize();
 
     public Point getPosition();
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/DiagramScene.java	Sat Jan 28 15:48:40 2012 +0100
+++ b/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/DiagramScene.java	Sat Jan 28 16:07:06 2012 +0100
@@ -28,7 +28,6 @@
 import com.sun.hotspot.igv.data.services.Scheduler;
 import com.sun.hotspot.igv.graph.*;
 import com.sun.hotspot.igv.hierarchicallayout.HierarchicalLayoutManager;
-import com.sun.hotspot.igv.layout.Cluster;
 import com.sun.hotspot.igv.layout.LayoutGraph;
 import com.sun.hotspot.igv.selectioncoordinator.SelectionCoordinator;
 import com.sun.hotspot.igv.util.ColorIcon;
@@ -470,13 +469,7 @@
 
         name += " (";
 
-        if (f.getCluster() != null) {
-            name += "B" + f.getCluster().toString();
-        }
         if (!this.getWidget(f, FigureWidget.class).isVisible()) {
-            if (f.getCluster() != null) {
-                name += ", ";
-            }
             name += "hidden";
         }
         name += ")";
@@ -509,14 +502,6 @@
 
         Diagram d = getModel().getDiagramToView();
 
-        if (d.getGraph().getBlocks().isEmpty()) {
-            Scheduler s = Lookup.getDefault().lookup(Scheduler.class);
-            d.getGraph().clearBlocks();
-            s.schedule(d.getGraph());
-            d.getGraph().ensureNodesInBlocks();
-            d.updateBlocks();
-        }
-
         for (Figure f : d.getFigures()) {
             FigureWidget w = new FigureWidget(f, hoverAction, selectAction, this, mainLayer);
             w.getActions().addAction(ActionFactory.createPopupMenuAction(w));
@@ -542,15 +527,6 @@
                 sw.getActions().addAction(selectAction);
             }
         }
-
-        if (getModel().getShowBlocks()) {
-            for (InputBlock bn : d.getGraph().getBlocks()) {
-                BlockWidget w = new BlockWidget(this, d, bn);
-                w.setVisible(false);
-                this.addObject(bn, w);
-                blockLayer.addChild(w);
-            }
-        }
         
         rebuilding = false;
         this.smallUpdate(true);
@@ -606,22 +582,6 @@
         HierarchicalLayoutManager manager = new HierarchicalLayoutManager(HierarchicalLayoutManager.Combine.SAME_OUTPUTS);
         manager.setMaxLayerLength(10);
         manager.doLayout(new LayoutGraph(edges, figures));
-        
-        
-        if (getModel().getShowBlocks()) {
-            for (Figure f : diagram.getFigures()) {
-                Cluster c = f.getCluster();
-                Rectangle r = c.getBounds();
-                Rectangle figureBounds = f.getBounds();
-                figureBounds.grow(BORDER_SIZE, BORDER_SIZE);
-                if (r != null) {
-                    figureBounds.add(r);
-                }
-                c.setBounds(figureBounds);
-            }
-        }
-        
-
         relayoutWithoutLayout(oldVisibleWidgets);
     }
     private Set<Pair<Point, Point>> lineCache = new HashSet<>();
@@ -658,21 +618,6 @@
             }
         }
 
-        if (getModel().getShowBlocks()) {
-            for (Block b : diagram.getBlocks()) {
-                BlockWidget w = getWidget(b.getInputBlock());
-                if (w != null && w.isVisible()) {
-                    Rectangle r = b.getBounds();
-                    if (r == null) {
-                        w.setVisible(false);
-                    } else {
-                        maxX = Math.max(maxX, r.x + r.width);
-                        maxY = Math.max(maxY, r.y + r.height);
-                    }
-                }
-            }
-        }
-
         bottomRight.setPreferredLocation(new Point(maxX + BORDER_SIZE, maxY + BORDER_SIZE));
         int offx = 0;
         int offy = 0;
@@ -729,23 +674,6 @@
             }
         }
 
-        if (getModel().getShowBlocks()) {
-            for (Block b : diagram.getBlocks()) {
-                BlockWidget w = getWidget(b.getInputBlock());
-                if (w != null && w.isVisible()) {
-                    Point location = new Point(b.getBounds().x + offx2, b.getBounds().y + offy2);
-                    Rectangle r = new Rectangle(location.x, location.y, b.getBounds().width, b.getBounds().height);
-                    
-                    if ((visibleFigureCount <= ANIMATION_LIMIT && oldVisibleWidgets != null && oldVisibleWidgets.contains(w))) {
-                        animator.animatePreferredBounds(w, r);
-                    } else {
-                        w.setPreferredBounds(r);
-                        animator.animatePreferredBounds(w, r);
-                    }
-                }
-            }
-        }
-
         this.validate();
     }
     private final Point specialNullPoint = new Point(Integer.MAX_VALUE, Integer.MAX_VALUE);
@@ -1030,7 +958,6 @@
     private void updateHiddenNodes(Set<Integer> newHiddenNodes, boolean doRelayout) {
 
         System.out.println("newHiddenNodes: " + newHiddenNodes);
-        Set<InputBlock> visibleBlocks = new HashSet<>();
 
         Diagram diagram = getModel().getDiagramToView();
         assert diagram != null;
@@ -1044,15 +971,6 @@
             }
         }
 
-        if (getModel().getShowBlocks()) {
-            for (InputBlock b : diagram.getGraph().getBlocks()) {
-                BlockWidget w = getWidget(b);
-                if (w.isVisible()) {
-                    oldVisibleWidgets.add(w);
-                }
-            }
-        }
-
         for (Figure f : diagram.getFigures()) {
             boolean hiddenAfter = doesIntersect(f.getSource().getSourceNodesAsSet(), newHiddenNodes);
 
@@ -1061,9 +979,6 @@
             if (!hiddenAfter) {
                 // Figure is shown
                 w.setVisible(true);
-                for (InputNode n : f.getSource().getSourceNodes()) {
-                    visibleBlocks.add(diagram.getGraph().getBlock(n));
-                }
             } else {
                 // Figure is hidden
                 w.setVisible(false);
@@ -1089,9 +1004,6 @@
 
                     if (b) {
                         w.setBoundary(true);
-                        for (InputNode n : f.getSource().getSourceNodes()) {
-                            visibleBlocks.add(diagram.getGraph().getBlock(n));
-                        }
                         boundaries.add(w);
                     }
                 }
@@ -1104,22 +1016,6 @@
             }
         }
 
-        if (getModel().getShowBlocks()) {
-            for (InputBlock b : diagram.getGraph().getBlocks()) {
-
-                boolean visibleAfter = visibleBlocks.contains(b);
-
-                BlockWidget w = getWidget(b);
-                if (visibleAfter) {
-                    // Block must be shown
-                    w.setVisible(true);
-                } else {
-                    // Block must be hidden
-                    w.setVisible(false);
-                }
-            }
-        }
-
         if (doRelayout) {
             relayout(oldVisibleWidgets);
         }
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/DiagramViewModel.java	Sat Jan 28 15:48:40 2012 +0100
+++ b/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/DiagramViewModel.java	Sat Jan 28 16:07:06 2012 +0100
@@ -63,7 +63,6 @@
     private ChangedEvent<DiagramViewModel> viewChangedEvent;
     private ChangedEvent<DiagramViewModel> hiddenNodesChangedEvent;
     private ChangedEvent<DiagramViewModel> viewPropertiesChangedEvent;
-    private boolean showBlocks;
     private boolean showNodeHull;
     private ChangedListener<FilterChain> filterChainChangedListener = new ChangedListener<FilterChain>() {
 
@@ -100,8 +99,6 @@
         this.onScreenNodes = newModel.onScreenNodes;
         viewChanged |= (selectedNodes != newModel.selectedNodes);
         this.selectedNodes = newModel.selectedNodes;
-        viewPropertiesChanged |= (showBlocks != newModel.showBlocks);
-        this.showBlocks = newModel.showBlocks;
         viewPropertiesChanged |= (showNodeHull != newModel.showNodeHull);
         this.showNodeHull = newModel.showNodeHull;
 
@@ -120,15 +117,6 @@
         }
     }
 
-    public boolean getShowBlocks() {
-        return showBlocks;
-    }
-
-    public void setShowBlocks(boolean b) {
-        showBlocks = b;
-        viewPropertiesChangedEvent.fire();
-    }
-
     public boolean getShowNodeHull() {
         return showNodeHull;
     }
@@ -142,7 +130,6 @@
         super(calculateStringList(g));
 
         this.showNodeHull = true;
-        this.showBlocks = false;
         this.group = g;
         assert filterChain != null;
         this.filterChain = filterChain;
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/EditorTopComponent.java	Sat Jan 28 15:48:40 2012 +0100
+++ b/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/EditorTopComponent.java	Sat Jan 28 16:07:06 2012 +0100
@@ -28,7 +28,6 @@
 import com.sun.hotspot.igv.filter.FilterChain;
 import com.sun.hotspot.igv.graph.Diagram;
 import com.sun.hotspot.igv.graph.Figure;
-import com.sun.hotspot.igv.view.actions.EnableBlockLayoutAction;
 import com.sun.hotspot.igv.view.actions.ExpandPredecessorsAction;
 import com.sun.hotspot.igv.view.actions.ExpandSuccessorsAction;
 import com.sun.hotspot.igv.view.actions.ExtractAction;
@@ -110,7 +109,6 @@
     private DiagramViewer scene;
     private InstanceContent content;
     private InstanceContent graphContent;
-    private EnableBlockLayoutAction blockLayoutAction;
     private OverviewAction overviewAction;
     private PredSuccAction predSuccAction;
     private SelectionModeAction selectionModeAction;
@@ -252,12 +250,6 @@
         toolBar.add(ShowAllAction.get(ZoomInAction.class));
         toolBar.add(ShowAllAction.get(ZoomOutAction.class));
 
-        blockLayoutAction = new EnableBlockLayoutAction();
-        JToggleButton button = new JToggleButton(blockLayoutAction);
-        button.setSelected(true);
-        toolBar.add(button);
-        blockLayoutAction.addPropertyChangeListener(this);
-
         overviewAction = new OverviewAction();
         overviewButton = new JToggleButton(overviewAction);
         overviewButton.setSelected(false);
@@ -265,7 +257,7 @@
         overviewAction.addPropertyChangeListener(this);
 
         predSuccAction = new PredSuccAction();
-        button = new JToggleButton(predSuccAction);
+        JToggleButton button = new JToggleButton(predSuccAction);
         button.setSelected(true);
         toolBar.add(button);
         predSuccAction.addPropertyChangeListener(this);
@@ -511,9 +503,6 @@
             } else {
                 showScene();
             }
-        } else if (evt.getSource() == this.blockLayoutAction) {
-            boolean b = (Boolean) blockLayoutAction.getValue(EnableBlockLayoutAction.STATE);
-            this.getModel().setShowBlocks(b);
         } else if (evt.getSource() == this.selectionModeAction || evt.getSource() == this.panModeAction) {
             if (panModeAction.isSelected()) {
                 scene.setInteractionMode(DiagramViewer.InteractionMode.PANNING);
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/actions/EnableBlockLayoutAction.java	Sat Jan 28 15:48:40 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-package com.sun.hotspot.igv.view.actions;
-
-import java.awt.event.ActionEvent;
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.ImageIcon;
-import org.openide.util.ImageUtilities;
-
-/**
- *
- * @author Thomas Wuerthinger
- */
-public class EnableBlockLayoutAction extends AbstractAction {
-
-    private boolean state;
-    public static final String STATE = "state";
-
-    public EnableBlockLayoutAction() {
-        state = true;
-        putValue(AbstractAction.SMALL_ICON, new ImageIcon(ImageUtilities.loadImage(iconResource())));
-        putValue(STATE, true);
-        putValue(Action.SHORT_DESCRIPTION, "Cluster nodes into blocks");
-    }
-
-    @Override
-    public void actionPerformed(ActionEvent ev) {
-        this.state = !state;
-        this.putValue(STATE, state);
-    }
-
-    protected String iconResource() {
-        return "com/sun/hotspot/igv/view/images/blocks.gif";
-    }
-}
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/widgets/BlockWidget.java	Sat Jan 28 15:48:40 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-package com.sun.hotspot.igv.view.widgets;
-
-import com.sun.hotspot.igv.data.InputBlock;
-import com.sun.hotspot.igv.graph.Diagram;
-import java.awt.BasicStroke;
-import java.awt.Color;
-import java.awt.Font;
-import java.awt.Graphics2D;
-import java.awt.Rectangle;
-import java.awt.Stroke;
-import java.awt.geom.Rectangle2D;
-import org.netbeans.api.visual.widget.Scene;
-import org.netbeans.api.visual.widget.Widget;
-
-/**
- *
- * @author Thomas Wuerthinger
- */
-public class BlockWidget extends Widget {
-
-    public static final int BORDER = 20;
-    private static final Font titleFont = new Font("Serif", Font.PLAIN, 14).deriveFont(Font.BOLD);
-    private InputBlock blockNode;
-    private Diagram diagram;
-
-    public BlockWidget(Scene scene, Diagram d, InputBlock blockNode) {
-        super(scene);
-        this.blockNode = blockNode;
-        this.diagram = d;
-        this.setCheckClipping(true);
-    }
-
-    @Override
-    protected void paintWidget() {
-        super.paintWidget();
-        Graphics2D g = this.getGraphics();
-        Stroke old = g.getStroke();
-        g.setColor(Color.BLUE);
-        Rectangle r = new Rectangle(this.getPreferredBounds());
-        r.width--;
-        r.height--;
-        if (this.getBounds().width > 0 && this.getBounds().height > 0) {
-            g.setStroke(new BasicStroke(2));
-            g.drawRect(r.x, r.y, r.width, r.height);
-        }
-
-        Color titleColor = Color.BLACK;
-        g.setColor(titleColor);
-        g.setFont(titleFont);
-
-        String s = "B" + blockNode.getName();
-        Rectangle2D r1 = g.getFontMetrics().getStringBounds(s, g);
-        g.drawString(s, r.x + 5, r.y + (int) r1.getHeight());
-        g.setStroke(old);
-    }
-}
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/widgets/FigureWidget.java	Sat Jan 28 15:48:40 2012 +0100
+++ b/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/widgets/FigureWidget.java	Sat Jan 28 16:07:06 2012 +0100
@@ -239,11 +239,6 @@
 
     @Override
     protected void paintChildren() {
-
-        if (diagramScene.getZoomFactor() < ZOOM_FACTOR && diagramScene.getModel().getShowBlocks()) {
-            return;
-        }
-
         Composite oldComposite = null;
         if (boundary) {
             oldComposite = getScene().getGraphics().getComposite();
--- a/src/share/tools/IdealGraphVisualizer/nbproject/project.properties	Sat Jan 28 15:48:40 2012 +0100
+++ b/src/share/tools/IdealGraphVisualizer/nbproject/project.properties	Sat Jan 28 16:07:06 2012 +0100
@@ -8,7 +8,6 @@
     ${project.com.sun.hotspot.igv.filter}:\
     ${project.com.sun.hotspot.igv.hierarchicallayout}:\
     ${project.com.sun.hotspot.igv.layout}:\
-    ${project.com.sun.hotspot.igv.controlflow}:\
     ${project.com.sun.hotspot.igv.data}:\
     ${project.com.sun.hotspot.igv.view}:\
     ${project.com.sun.hotspot.igv.bytecodes}:\
@@ -23,7 +22,6 @@
     ${project.com.sun.hotspot.igv.graal}
 project.com.sun.hotspot.connection=NetworkConnection
 project.com.sun.hotspot.igv.bytecodes=Bytecodes
-project.com.sun.hotspot.igv.controlflow=ControlFlow
 project.com.sun.hotspot.igv.coordinator=Coordinator
 project.com.sun.hotspot.igv.data=Data
 project.com.sun.hotspot.igv.difference=Difference