# HG changeset patch # User Thomas Wuerthinger # Date 1327763226 -3600 # Node ID 6a28db4be8041108a6c9aaab34c7afacc66099bb # Parent 6ffa3413096e28ca7c3e91ba2adbb41eade38a42 Removed CFG view and related concepts from IGV. diff -r 6ffa3413096e -r 6a28db4be804 src/share/tools/IdealGraphVisualizer/ControlFlow/build.xml --- 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 @@ - - - - - - Builds, tests, and runs the project com.sun.hotspot.igv.controlflow. - - diff -r 6ffa3413096e -r 6a28db4be804 src/share/tools/IdealGraphVisualizer/ControlFlow/manifest.mf --- 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 - diff -r 6ffa3413096e -r 6a28db4be804 src/share/tools/IdealGraphVisualizer/ControlFlow/nbproject/build-impl.xml --- 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 @@ - - - - - - You must set 'suite.dir' to point to your containing module suite - - - - - - - - - - - - - - - - - - - - - diff -r 6ffa3413096e -r 6a28db4be804 src/share/tools/IdealGraphVisualizer/ControlFlow/nbproject/genfiles.properties --- 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 diff -r 6ffa3413096e -r 6a28db4be804 src/share/tools/IdealGraphVisualizer/ControlFlow/nbproject/platform.properties --- 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 diff -r 6ffa3413096e -r 6a28db4be804 src/share/tools/IdealGraphVisualizer/ControlFlow/nbproject/project.properties --- 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 diff -r 6ffa3413096e -r 6a28db4be804 src/share/tools/IdealGraphVisualizer/ControlFlow/nbproject/project.xml --- 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 @@ - - - org.netbeans.modules.apisupport.project - - - com.sun.hotspot.igv.controlflow - - - - com.sun.hotspot.igv.data - - - - 1.0 - - - - com.sun.hotspot.igv.hierarchicallayout - - - - 1.0 - - - - com.sun.hotspot.igv.layout - - - - 1.0 - - - - com.sun.hotspot.igv.util - - - - 1.0 - - - - org.jdesktop.layout - - - - 1 - 1.16.1 - - - - org.netbeans.api.visual - - - - 2.9 - - - - org.openide.util - - - - 8.14.1 - - - - org.openide.util.lookup - - - - 8.6.1 - - - - org.openide.windows - - - - 6.16 - - - - - - - diff -r 6ffa3413096e -r 6a28db4be804 src/share/tools/IdealGraphVisualizer/ControlFlow/nbproject/suite.properties --- 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}/.. diff -r 6ffa3413096e -r 6a28db4be804 src/share/tools/IdealGraphVisualizer/Graph/src/com/sun/hotspot/igv/graph/Block.java --- 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 getSuccessors() { - Set 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(); - } -} - diff -r 6ffa3413096e -r 6a28db4be804 src/share/tools/IdealGraphVisualizer/Graph/src/com/sun/hotspot/igv/graph/Diagram.java --- 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
figures; - private Map 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 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 nodes = graph.getNodes(); Hashtable figureHash = new Hashtable<>(); for (InputNode n : nodes) { diff -r 6ffa3413096e -r 6a28db4be804 src/share/tools/IdealGraphVisualizer/Graph/src/com/sun/hotspot/igv/graph/Figure.java --- 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 sourceNodes = source.getSourceNodes(); diff -r 6ffa3413096e -r 6a28db4be804 src/share/tools/IdealGraphVisualizer/Layout/src/com/sun/hotspot/igv/layout/Cluster.java --- 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 { - - public Cluster getOuter(); - - public Rectangle getBounds(); - - public void setBounds(Rectangle r); - - public Set getSuccessors(); -} diff -r 6ffa3413096e -r 6a28db4be804 src/share/tools/IdealGraphVisualizer/Layout/src/com/sun/hotspot/igv/layout/LayoutGraph.java --- 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 findRootVertices() { return findRootVertices(new HashSet()); } - - public SortedSet getClusters() { - - SortedSet clusters = new TreeSet<>(); - for (Vertex v : getVertices()) { - if (v.getCluster() != null) { - clusters.add(v.getCluster()); - } - } - - return clusters; - } } diff -r 6ffa3413096e -r 6a28db4be804 src/share/tools/IdealGraphVisualizer/Layout/src/com/sun/hotspot/igv/layout/Vertex.java --- 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 { - public Cluster getCluster(); - public Dimension getSize(); public Point getPosition(); diff -r 6ffa3413096e -r 6a28db4be804 src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/DiagramScene.java --- 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> 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 newHiddenNodes, boolean doRelayout) { System.out.println("newHiddenNodes: " + newHiddenNodes); - Set 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); } diff -r 6ffa3413096e -r 6a28db4be804 src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/DiagramViewModel.java --- 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 viewChangedEvent; private ChangedEvent hiddenNodesChangedEvent; private ChangedEvent viewPropertiesChangedEvent; - private boolean showBlocks; private boolean showNodeHull; private ChangedListener filterChainChangedListener = new ChangedListener() { @@ -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; diff -r 6ffa3413096e -r 6a28db4be804 src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/EditorTopComponent.java --- 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); diff -r 6ffa3413096e -r 6a28db4be804 src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/actions/EnableBlockLayoutAction.java --- 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"; - } -} diff -r 6ffa3413096e -r 6a28db4be804 src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/widgets/BlockWidget.java --- 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); - } -} diff -r 6ffa3413096e -r 6a28db4be804 src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/widgets/FigureWidget.java --- 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(); diff -r 6ffa3413096e -r 6a28db4be804 src/share/tools/IdealGraphVisualizer/nbproject/project.properties --- 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