changeset 4493:bcce7f52832d

Extracted editor into a new project to separate it from the diagram scene view.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Wed, 01 Feb 2012 18:29:28 +0100
parents 71990133c897
children e55e2fca50fa
files src/share/tools/IdealGraphVisualizer/Editor/manifest.mf src/share/tools/IdealGraphVisualizer/Editor/src/META-INF/services/com.sun.hotspot.igv.data.services.GraphViewer src/share/tools/IdealGraphVisualizer/Editor/src/com/oracle/graal/visualizer/editor/Bundle.properties src/share/tools/IdealGraphVisualizer/Editor/src/com/oracle/graal/visualizer/editor/CompilationViewer.java src/share/tools/IdealGraphVisualizer/Editor/src/com/oracle/graal/visualizer/editor/CompilationViewerFactory.java src/share/tools/IdealGraphVisualizer/Editor/src/com/oracle/graal/visualizer/editor/DiagramViewModel.java src/share/tools/IdealGraphVisualizer/Editor/src/com/oracle/graal/visualizer/editor/EditorInputGraphProvider.java src/share/tools/IdealGraphVisualizer/Editor/src/com/oracle/graal/visualizer/editor/EditorTopComponent.form src/share/tools/IdealGraphVisualizer/Editor/src/com/oracle/graal/visualizer/editor/EditorTopComponent.java src/share/tools/IdealGraphVisualizer/Editor/src/com/oracle/graal/visualizer/editor/ExportCookie.java src/share/tools/IdealGraphVisualizer/Editor/src/com/oracle/graal/visualizer/editor/GraphViewerImplementation.java src/share/tools/IdealGraphVisualizer/Editor/src/com/oracle/graal/visualizer/editor/NodeQuickSearch.java src/share/tools/IdealGraphVisualizer/Editor/src/com/oracle/graal/visualizer/editor/actions/NextDiagramAction.java src/share/tools/IdealGraphVisualizer/Editor/src/com/oracle/graal/visualizer/editor/actions/PrevDiagramAction.java src/share/tools/IdealGraphVisualizer/Editor/src/com/oracle/graal/visualizer/editor/layer.xml src/share/tools/IdealGraphVisualizer/View/nbproject/project.xml src/share/tools/IdealGraphVisualizer/View/src/META-INF/services/com.oracle.graal.visualizer.editor.CompilationViewerFactory src/share/tools/IdealGraphVisualizer/View/src/META-INF/services/com.sun.hotspot.igv.data.services.GraphViewer src/share/tools/IdealGraphVisualizer/View/src/META-INF/services/com.sun.hotspot.igv.view.CompilationViewerFactory src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/BoundedZoomAction.java src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/Bundle.properties src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/CompilationViewer.java src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/CompilationViewerFactory.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/EditorInputGraphProvider.java src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/EditorTopComponent.form src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/EditorTopComponent.java src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/ExportCookie.java src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/ExtendedSatelliteComponent.java src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/GraphViewerImplementation.java src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/NodeQuickSearch.java src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/actions/Bundle.properties src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/actions/ExpandPredecessorsAction.java src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/actions/ExpandSuccessorsAction.java src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/actions/ExportAction.java src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/actions/ExtractAction.java src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/actions/HideAction.java src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/actions/NextDiagramAction.java src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/actions/PrevDiagramAction.java src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/actions/ShowAllAction.java src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/actions/ZoomInAction.java src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/actions/ZoomOutAction.java src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/layer.xml src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/scene/DiagramScene.java src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/scene/GraphCompilationViewer.java src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/scene/GraphCompilationViewerFactory.java src/share/tools/IdealGraphVisualizer/nbproject/project.properties
diffstat 47 files changed, 1620 insertions(+), 2017 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/Editor/manifest.mf	Wed Feb 01 18:29:28 2012 +0100
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+OpenIDE-Module: com.oracle.graal.visualizer.editor
+OpenIDE-Module-Layer: com/oracle/graal/visualizer/editor/layer.xml
+OpenIDE-Module-Localizing-Bundle: com/oracle/graal/visualizer/editor/Bundle.properties
+OpenIDE-Module-Specification-Version: 1.0
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/Editor/src/META-INF/services/com.sun.hotspot.igv.data.services.GraphViewer	Wed Feb 01 18:29:28 2012 +0100
@@ -0,0 +1,1 @@
+com.oracle.graal.visualizer.editor.GraphViewerImplementation
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/Editor/src/com/oracle/graal/visualizer/editor/Bundle.properties	Wed Feb 01 18:29:28 2012 +0100
@@ -0,0 +1,3 @@
+OpenIDE-Module-Name=Editor
+CTL_EditorTopComponent=Compilation
+HINT_EditorTopComponent=Shows the snapshots of a single compilation.
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/Editor/src/com/oracle/graal/visualizer/editor/CompilationViewer.java	Wed Feb 01 18:29:28 2012 +0100
@@ -0,0 +1,55 @@
+/*
+ * 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.oracle.graal.visualizer.editor;
+
+import com.sun.hotspot.igv.graph.Figure;
+import java.awt.Component;
+import java.awt.Graphics2D;
+import java.util.Collection;
+import org.openide.awt.UndoRedo;
+import org.openide.util.Lookup;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public interface CompilationViewer {
+
+    public Lookup getLookup();
+
+    public Component getComponent();
+    
+    public Component getToolBarComponent();
+
+    public UndoRedo getUndoRedo();
+
+    public void setSelection(Collection<Figure> list);
+
+    public void paint(Graphics2D svgGenerator);
+
+    public void zoomOut();
+
+    public void zoomIn();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/Editor/src/com/oracle/graal/visualizer/editor/CompilationViewerFactory.java	Wed Feb 01 18:29:28 2012 +0100
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2012, 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.oracle.graal.visualizer.editor;
+
+public interface CompilationViewerFactory {
+    CompilationViewer createViewer(DiagramViewModel model);
+    String getName();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/Editor/src/com/oracle/graal/visualizer/editor/DiagramViewModel.java	Wed Feb 01 18:29:28 2012 +0100
@@ -0,0 +1,388 @@
+/*
+ * Copyright (c) 1998, 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * 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.oracle.graal.visualizer.editor;
+
+import com.sun.hotspot.igv.data.*;
+import com.sun.hotspot.igv.difference.Difference;
+import com.sun.hotspot.igv.filter.CustomFilter;
+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.settings.Settings;
+import com.sun.hotspot.igv.util.RangeSliderModel;
+import java.awt.Color;
+import java.util.*;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public class DiagramViewModel extends RangeSliderModel implements ChangedListener<RangeSliderModel> {
+
+    // Warning: Update setData method if fields are added
+    private Group group;
+    private Set<Integer> hiddenNodes;
+    private Set<Integer> onScreenNodes;
+    private Set<Integer> selectedNodes;
+    private FilterChain filterChain;
+    private FilterChain sequenceFilterChain;
+    private Diagram diagram;
+    private InputGraph inputGraph;
+    private ChangedEvent<DiagramViewModel> groupChangedEvent;
+    private ChangedEvent<DiagramViewModel> diagramChangedEvent;
+    private ChangedEvent<DiagramViewModel> viewChangedEvent;
+    private ChangedEvent<DiagramViewModel> hiddenNodesChangedEvent;
+    private ChangedEvent<DiagramViewModel> viewPropertiesChangedEvent;
+    private boolean showNodeHull;
+    private ChangedListener<FilterChain> filterChainChangedListener = new ChangedListener<FilterChain>() {
+
+        @Override
+        public void changed(FilterChain source) {
+            diagramChanged();
+        }
+    };
+
+    @Override
+    public DiagramViewModel copy() {
+        DiagramViewModel result = new DiagramViewModel(group, filterChain, sequenceFilterChain);
+        result.setData(this);
+        return result;
+    }
+
+    public void setData(DiagramViewModel newModel) {
+        super.setData(newModel);
+        boolean diagramChanged = false;
+        boolean viewChanged = false;
+        boolean viewPropertiesChanged = false;
+
+        boolean groupChanged = (group == newModel.group);
+        this.group = newModel.group;
+        diagramChanged |= (filterChain != newModel.filterChain);
+        this.filterChain = newModel.filterChain;
+        diagramChanged |= (sequenceFilterChain != newModel.sequenceFilterChain);
+        this.sequenceFilterChain = newModel.sequenceFilterChain;
+        diagramChanged |= (diagram != newModel.diagram);
+        this.diagram = newModel.diagram;
+        viewChanged |= (hiddenNodes != newModel.hiddenNodes);
+        this.hiddenNodes = newModel.hiddenNodes;
+        viewChanged |= (onScreenNodes != newModel.onScreenNodes);
+        this.onScreenNodes = newModel.onScreenNodes;
+        viewChanged |= (selectedNodes != newModel.selectedNodes);
+        this.selectedNodes = newModel.selectedNodes;
+        viewPropertiesChanged |= (showNodeHull != newModel.showNodeHull);
+        this.showNodeHull = newModel.showNodeHull;
+
+        if (groupChanged) {
+            groupChangedEvent.fire();
+        }
+
+        if (diagramChanged) {
+            diagramChangedEvent.fire();
+        }
+        if (viewPropertiesChanged) {
+            viewPropertiesChangedEvent.fire();
+        }
+        if (viewChanged) {
+            viewChangedEvent.fire();
+        }
+    }
+
+    public boolean getShowNodeHull() {
+        return showNodeHull;
+    }
+
+    public void setShowNodeHull(boolean b) {
+        showNodeHull = b;
+        viewPropertiesChangedEvent.fire();
+    }
+
+    public DiagramViewModel(Group g, FilterChain filterChain, FilterChain sequenceFilterChain) {
+        super(calculateStringList(g));
+
+        this.showNodeHull = true;
+        this.group = g;
+        assert filterChain != null;
+        this.filterChain = filterChain;
+        assert sequenceFilterChain != null;
+        this.sequenceFilterChain = sequenceFilterChain;
+        hiddenNodes = new HashSet<>();
+        onScreenNodes = new HashSet<>();
+        selectedNodes = new HashSet<>();
+        super.getChangedEvent().addListener(this);
+        diagramChangedEvent = new ChangedEvent<>(this);
+        viewChangedEvent = new ChangedEvent<>(this);
+        hiddenNodesChangedEvent = new ChangedEvent<>(this);
+        viewPropertiesChangedEvent = new ChangedEvent<>(this);
+
+        groupChangedEvent = new ChangedEvent<>(this);
+        groupChangedEvent.addListener(groupChangedListener);
+        groupChangedEvent.fire();
+
+        filterChain.getChangedEvent().addListener(filterChainChangedListener);
+        sequenceFilterChain.getChangedEvent().addListener(filterChainChangedListener);
+    }
+    private final ChangedListener<DiagramViewModel> groupChangedListener = new ChangedListener<DiagramViewModel>() {
+
+        private Group oldGroup;
+
+        @Override
+        public void changed(DiagramViewModel source) {
+            if (oldGroup != null) {
+                oldGroup.getChangedEvent().removeListener(groupContentChangedListener);
+            }
+            group.getChangedEvent().addListener(groupContentChangedListener);
+            oldGroup = group;
+        }
+    };
+    private final ChangedListener<Group> groupContentChangedListener = new ChangedListener<Group>() {
+
+        @Override
+        public void changed(Group source) {
+            assert source == group;
+            setPositions(calculateStringList(source));
+            setSelectedNodes(selectedNodes);
+        }
+    };
+
+    public ChangedEvent<DiagramViewModel> getDiagramChangedEvent() {
+        return diagramChangedEvent;
+    }
+
+    public ChangedEvent<DiagramViewModel> getViewChangedEvent() {
+        return viewChangedEvent;
+    }
+
+    public ChangedEvent<DiagramViewModel> getHiddenNodesChangedEvent() {
+        return hiddenNodesChangedEvent;
+    }
+
+    public ChangedEvent<DiagramViewModel> getViewPropertiesChangedEvent() {
+        return viewPropertiesChangedEvent;
+    }
+
+    public Set<Integer> getSelectedNodes() {
+        return selectedNodes;
+    }
+
+    public Set<Integer> getHiddenNodes() {
+        return hiddenNodes;
+    }
+
+    public Set<Integer> getOnScreenNodes() {
+        return onScreenNodes;
+    }
+
+    public void setSelectedNodes(Set<Integer> nodes) {
+        this.selectedNodes = nodes;
+        List<Color> colors = new ArrayList<>();
+        for (String s : getPositions()) {
+            colors.add(Color.black);
+        }
+        if (nodes.size() >= 1) {
+            for (Integer id : nodes) {
+                if (id < 0) {
+                    id = -id;
+                }
+                InputNode last = null;
+                int index = 0;
+                for (InputGraph g : group.getGraphs()) {
+                    Color curColor = colors.get(index);
+                    InputNode cur = g.getNode(id);
+                    if (cur != null) {
+                        if (last == null) {
+                            curColor = Color.green;
+                        } else {
+                            if (last.equals(cur)) {
+                                if (curColor == Color.black) {
+                                    curColor = Color.white;
+                                }
+                            } else {
+                                if (curColor != Color.green) {
+                                    curColor = Color.orange;
+                                }
+                            }
+                        }
+                    }
+                    last = cur;
+                    colors.set(index, curColor);
+                    index++;
+                }
+            }
+        }
+        setColors(colors);
+        viewChangedEvent.fire();
+    }
+
+    public void showNot(final Set<Integer> nodes) {
+        System.out.println("Shownot called with " + nodes);
+        setHiddenNodes(nodes);
+    }
+
+    public void showFigures(Collection<Figure> f) {
+        HashSet<Integer> newHiddenNodes = new HashSet<>(getHiddenNodes());
+        for (Figure fig : f) {
+            newHiddenNodes.removeAll(fig.getSource().getSourceNodesAsSet());
+        }
+        setHiddenNodes(newHiddenNodes);
+    }
+
+
+    public Set<Figure> getSelectedFigures() {
+        Set<Figure> result = new HashSet<>();
+        for (Figure f : diagram.getFigures()) {
+            for (InputNode node : f.getSource().getSourceNodes()) {
+                if (getSelectedNodes().contains(node.getId())) {
+                    result.add(f);
+                }
+            }
+        }
+        return result;
+    }
+
+    public void showAll(final Collection<Figure> f) {
+        showFigures(f);
+    }
+
+    public void showOnly(final Set<Integer> nodes) {
+        final HashSet<Integer> allNodes = new HashSet<>(getGraphToView().getGroup().getAllNodes());
+        allNodes.removeAll(nodes);
+        setHiddenNodes(allNodes);
+    }
+
+    public void setHiddenNodes(Set<Integer> nodes) {
+        this.hiddenNodes = nodes;
+        hiddenNodesChangedEvent.fire();
+    }
+
+    public void setOnScreenNodes(Set<Integer> onScreenNodes) {
+        this.onScreenNodes = onScreenNodes;
+        viewChangedEvent.fire();
+    }
+
+    public FilterChain getSequenceFilterChain() {
+        return filterChain;
+    }
+
+    public void setSequenceFilterChain(FilterChain chain) {
+        assert chain != null : "sequenceFilterChain must never be null";
+        sequenceFilterChain.getChangedEvent().removeListener(filterChainChangedListener);
+        sequenceFilterChain = chain;
+        sequenceFilterChain.getChangedEvent().addListener(filterChainChangedListener);
+        diagramChanged();
+    }
+
+    private void diagramChanged() {
+        // clear diagram
+        diagram = null;
+        getDiagramChangedEvent().fire();
+
+    }
+
+    public FilterChain getFilterChain() {
+        return filterChain;
+    }
+
+    public void setFilterChain(FilterChain chain) {
+        assert chain != null : "filterChain must never be null";
+        filterChain.getChangedEvent().removeListener(filterChainChangedListener);
+        filterChain = chain;
+        filterChain.getChangedEvent().addListener(filterChainChangedListener);
+        diagramChanged();
+    }
+
+    private static List<String> calculateStringList(Group g) {
+        List<String> result = new ArrayList<>();
+        for (InputGraph graph : g.getGraphs()) {
+            result.add(graph.getName());
+        }
+        return result;
+    }
+
+    public InputGraph getFirstGraph() {
+        List<InputGraph> graphs = group.getGraphs();
+        if (getFirstPosition() < graphs.size()) {
+            return graphs.get(getFirstPosition());
+        }
+        return graphs.get(graphs.size() - 1);
+    }
+
+    public InputGraph getSecondGraph() {
+        List<InputGraph> graphs = group.getGraphs();
+        if (getSecondPosition() < graphs.size()) {
+            return graphs.get(getSecondPosition());
+        }
+        return getFirstGraph();
+    }
+
+    public void selectGraph(InputGraph g) {
+        int index = group.getGraphs().indexOf(g);
+        assert index != -1;
+        setPositions(index, index);
+    }
+
+    public Diagram getDiagramToView() {
+
+        if (diagram == null) {
+            diagram = Diagram.createDiagram(getGraphToView(), Settings.get().get(Settings.NODE_TEXT, Settings.NODE_TEXT_DEFAULT));
+            getFilterChain().apply(diagram, getSequenceFilterChain());
+            if (getFirstPosition() != getSecondPosition()) {
+                CustomFilter f = new CustomFilter(
+                        "difference", "colorize('state', 'same', white);"
+                        + "colorize('state', 'changed', orange);"
+                        + "colorize('state', 'new', green);"
+                        + "colorize('state', 'deleted', red);");
+                f.apply(diagram);
+           }
+        }
+
+        return diagram;
+    }
+
+    public InputGraph getGraphToView() {
+        if (inputGraph == null) {
+            if (getFirstGraph() != getSecondGraph()) {
+                inputGraph = Difference.createDiffGraph(getFirstGraph(), getSecondGraph());
+            } else {
+                inputGraph = getFirstGraph();
+            }
+        }
+
+        return inputGraph;
+    }
+
+    @Override
+    public void changed(RangeSliderModel source) {
+        inputGraph = null;
+        diagramChanged();
+    }
+
+    void setSelectedFigures(List<Figure> list) {
+        Set<Integer> newSelectedNodes = new HashSet<>();
+        for (Figure f : list) {
+            newSelectedNodes.addAll(f.getSource().getSourceNodesAsSet());
+        }
+        this.setSelectedNodes(newSelectedNodes);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/Editor/src/com/oracle/graal/visualizer/editor/EditorInputGraphProvider.java	Wed Feb 01 18:29:28 2012 +0100
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 1998, 2007, 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * 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.oracle.graal.visualizer.editor;
+
+import com.sun.hotspot.igv.data.InputGraph;
+import com.sun.hotspot.igv.data.InputNode;
+import com.sun.hotspot.igv.data.services.InputGraphProvider;
+import java.util.Set;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public class EditorInputGraphProvider implements InputGraphProvider {
+
+    private EditorTopComponent editor;
+    
+    public EditorInputGraphProvider(EditorTopComponent editor) {
+        this.editor = editor;
+    }
+    
+    @Override
+    public InputGraph getGraph() {
+        return editor.getDiagramModel().getGraphToView();
+    }
+
+    @Override
+    public void setSelectedNodes(Set<InputNode> nodes) {
+        editor.setSelectedNodes(nodes);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/Editor/src/com/oracle/graal/visualizer/editor/EditorTopComponent.form	Wed Feb 01 18:29:28 2012 +0100
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<Form version="1.2" maxVersion="1.2" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
+  <NonVisualComponents>
+    <Component class="javax.swing.JCheckBox" name="jCheckBox1">
+      <Properties>
+        <Property name="text" type="java.lang.String" value="jCheckBox1"/>
+        <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
+          <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
+            <EmptyBorder bottom="0" left="0" right="0" top="0"/>
+          </Border>
+        </Property>
+        <Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
+          <Insets value="[0, 0, 0, 0]"/>
+        </Property>
+      </Properties>
+    </Component>
+  </NonVisualComponents>
+  <AuxValues>
+    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
+    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
+    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
+    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/>
+    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+    <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/>
+  </AuxValues>
+
+  <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
+</Form>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/Editor/src/com/oracle/graal/visualizer/editor/EditorTopComponent.java	Wed Feb 01 18:29:28 2012 +0100
@@ -0,0 +1,351 @@
+/*
+ * 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.oracle.graal.visualizer.editor;
+
+import com.oracle.graal.visualizer.editor.actions.NextDiagramAction;
+import com.oracle.graal.visualizer.editor.actions.PrevDiagramAction;
+import com.sun.hotspot.igv.data.ChangedEvent;
+import com.sun.hotspot.igv.data.ChangedListener;
+import com.sun.hotspot.igv.data.InputGraph;
+import com.sun.hotspot.igv.data.InputNode;
+import com.sun.hotspot.igv.data.services.InputGraphProvider;
+import com.sun.hotspot.igv.filter.FilterChain;
+import com.sun.hotspot.igv.filter.FilterChainProvider;
+import com.sun.hotspot.igv.graph.Diagram;
+import com.sun.hotspot.igv.graph.Figure;
+import com.sun.hotspot.igv.graph.services.DiagramProvider;
+import com.sun.hotspot.igv.util.LookupHistory;
+import com.sun.hotspot.igv.util.RangeSlider;
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.util.*;
+import javax.swing.*;
+import javax.swing.border.Border;
+import org.openide.actions.RedoAction;
+import org.openide.actions.UndoAction;
+import org.openide.awt.Toolbar;
+import org.openide.awt.ToolbarPool;
+import org.openide.awt.UndoRedo;
+import org.openide.util.Lookup;
+import org.openide.util.NbBundle;
+import org.openide.util.Utilities;
+import org.openide.util.actions.Presenter;
+import org.openide.util.lookup.AbstractLookup;
+import org.openide.util.lookup.InstanceContent;
+import org.openide.util.lookup.ProxyLookup;
+import org.openide.windows.Mode;
+import org.openide.windows.TopComponent;
+import org.openide.windows.WindowManager;
+
+/**
+ * 
+ * @author Thomas Wuerthinger
+ */
+public final class EditorTopComponent extends TopComponent {
+
+    private InstanceContent content;
+    private InstanceContent graphContent;
+    private RangeSlider rangeSlider;
+    private static final String PREFERRED_ID = "EditorTopComponent";
+    private DiagramViewModel rangeSliderModel;
+    private CompilationViewer viewer;
+    
+
+    private DiagramProvider diagramProvider = new DiagramProvider() {
+
+        @Override
+        public Diagram getDiagram() {
+            return getModel().getDiagramToView();
+        }
+
+        @Override
+        public ChangedEvent<DiagramProvider> getChangedEvent() {
+            return diagramChangedEvent;
+        }
+    };
+
+    private ChangedEvent<DiagramProvider> diagramChangedEvent = new ChangedEvent<>(diagramProvider);
+    
+
+    private void updateDisplayName() {
+        setDisplayName(getDiagram().getName());
+    }
+
+    public EditorTopComponent(InputGraph graph) {
+
+        LookupHistory.init(InputGraphProvider.class);
+        LookupHistory.init(DiagramProvider.class);
+        this.setFocusable(true);
+        FilterChain filterChain;
+        FilterChain sequence;
+        FilterChainProvider provider = Lookup.getDefault().lookup(FilterChainProvider.class);
+        if (provider == null) {
+            filterChain = new FilterChain();
+            sequence = new FilterChain();
+        } else {
+            filterChain = provider.getFilterChain();
+            sequence = provider.getSequence();
+        }
+
+        setName(NbBundle.getMessage(EditorTopComponent.class, "CTL_EditorTopComponent"));
+        setToolTipText(NbBundle.getMessage(EditorTopComponent.class, "HINT_EditorTopComponent"));
+
+        initComponents();
+
+        ToolbarPool.getDefault().setPreferredIconSize(16);
+        Toolbar toolBar = new Toolbar();
+        Border b = (Border) UIManager.get("Nb.Editor.Toolbar.border"); //NOI18N
+        toolBar.setBorder(b);
+        this.add(BorderLayout.NORTH, toolBar);
+
+        rangeSliderModel = new DiagramViewModel(graph.getGroup(), filterChain, sequence);
+        rangeSlider = new RangeSlider();
+        rangeSlider.setModel(rangeSliderModel);
+
+        CompilationViewerFactory factory = Lookup.getDefault().lookup(CompilationViewerFactory.class);
+        viewer = factory.createViewer(rangeSliderModel);
+        content = new InstanceContent();
+        graphContent = new InstanceContent();
+        this.associateLookup(new ProxyLookup(new Lookup[]{viewer.getLookup(), new AbstractLookup(graphContent), new AbstractLookup(content)}));
+        content.add(rangeSliderModel);
+        content.add(diagramProvider);
+
+        rangeSliderModel.getDiagramChangedEvent().addListener(diagramChangedListener);
+        rangeSliderModel.selectGraph(graph);
+
+        toolBar.add(PrevDiagramAction.get(PrevDiagramAction.class));
+        toolBar.add(NextDiagramAction.get(NextDiagramAction.class));
+
+        toolBar.addSeparator();
+        toolBar.add(UndoAction.get(UndoAction.class));
+        toolBar.add(RedoAction.get(RedoAction.class));
+
+        toolBar.addSeparator();
+
+        Action action = Utilities.actionsForPath("QuickSearchShadow").get(0);
+        Component quicksearch = ((Presenter.Toolbar) action).getToolbarPresenter();
+        quicksearch.setMinimumSize(quicksearch.getPreferredSize()); // necessary for GTK LAF
+        toolBar.add(quicksearch);
+
+        toolBar.add(Box.createHorizontalGlue());        
+        toolBar.add(viewer.getToolBarComponent());
+
+        JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,
+                           new JScrollPane(rangeSlider), viewer.getComponent());
+        splitPane.setOneTouchExpandable(true);
+        splitPane.setDividerLocation(250);
+        this.add(splitPane, BorderLayout.CENTER);
+        
+        updateDisplayName();
+    }
+
+    public DiagramViewModel getDiagramModel() {
+        return rangeSliderModel;
+    }
+
+    public void showPrevDiagram() {
+        int fp = getModel().getFirstPosition();
+        int sp = getModel().getSecondPosition();
+        if (fp != 0) {
+            fp--;
+            sp--;
+            getModel().setPositions(fp, sp);
+        }
+    }
+
+    public DiagramViewModel getModel() {
+        return rangeSliderModel;
+    }
+
+    public FilterChain getFilterChain() {
+        return getModel().getFilterChain();
+    }
+
+    public static EditorTopComponent getActive() {
+        Set<? extends Mode> modes = WindowManager.getDefault().getModes();
+        for (Mode m : modes) {
+            TopComponent tc = m.getSelectedTopComponent();
+            if (tc instanceof EditorTopComponent) {
+                return (EditorTopComponent) tc;
+            }
+        }
+        return null;
+    }
+
+    /** This method is called from within the constructor to
+     * initialize the form.
+     * WARNING: Do NOT modify this code. The content of this method is
+     * always regenerated by the Form Editor.
+     */
+    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+    private void initComponents() {
+
+        jCheckBox1 = new javax.swing.JCheckBox();
+
+        org.openide.awt.Mnemonics.setLocalizedText(jCheckBox1, "jCheckBox1");
+        jCheckBox1.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
+        jCheckBox1.setMargin(new java.awt.Insets(0, 0, 0, 0));
+
+        setLayout(new java.awt.BorderLayout());
+    }// </editor-fold>//GEN-END:initComponents
+    // Variables declaration - do not modify//GEN-BEGIN:variables
+    private javax.swing.JCheckBox jCheckBox1;
+    // End of variables declaration//GEN-END:variables
+
+    @Override
+    public int getPersistenceType() {
+        return TopComponent.PERSISTENCE_NEVER;
+    }
+
+    @Override
+    public void componentOpened() {
+    }
+
+    @Override
+    public void componentClosed() {
+    }
+
+    @Override
+    protected String preferredID() {
+        return PREFERRED_ID;
+    }
+
+    private ChangedListener<DiagramViewModel> diagramChangedListener = new ChangedListener<DiagramViewModel>() {
+
+        @Override
+        public void changed(DiagramViewModel source) {
+            updateDisplayName();
+            Collection<Object> list = new ArrayList<>();
+            list.add(new EditorInputGraphProvider(EditorTopComponent.this));
+            graphContent.set(list, null);
+            diagramProvider.getChangedEvent().fire();
+        }
+        
+    };
+
+    public void setSelectedFigures(List<Figure> list) {
+        viewer.setSelection(list);
+    }
+
+    public void setSelectedNodes(Set<InputNode> nodes) {
+
+        List<Figure> list = new ArrayList<>();
+        Set<Integer> ids = new HashSet<>();
+        for (InputNode n : nodes) {
+            ids.add(n.getId());
+        }
+
+        for (Figure f : getModel().getDiagramToView().getFigures()) {
+            for (InputNode n : f.getSource().getSourceNodes()) {
+                if (ids.contains(n.getId())) {
+                    list.add(f);
+                    break;
+                }
+            }
+        }
+
+        setSelectedFigures(list);
+    }
+
+    public void extract() {
+        getModel().showOnly(getModel().getSelectedNodes());
+    }
+
+    public void hideNodes() {
+        Set<Integer> selectedNodes = this.getModel().getSelectedNodes();
+        HashSet<Integer> nodes = new HashSet<>(getModel().getHiddenNodes());
+        nodes.addAll(selectedNodes);
+        this.getModel().showNot(nodes);
+    }
+
+    public void expandPredecessors() {
+        Set<Figure> oldSelection = getModel().getSelectedFigures();
+        Set<Figure> figures = new HashSet<>();
+
+        for (Figure f : this.getDiagramModel().getDiagramToView().getFigures()) {
+            boolean ok = false;
+            if (oldSelection.contains(f)) {
+                ok = true;
+            } else {
+                for (Figure pred : f.getSuccessors()) {
+                    if (oldSelection.contains(pred)) {
+                        ok = true;
+                        break;
+                    }
+                }
+            }
+
+            if (ok) {
+                figures.add(f);
+            }
+        }
+
+        getModel().showAll(figures);
+    }
+
+    public void expandSuccessors() {
+        Set<Figure> oldSelection = getModel().getSelectedFigures();
+        Set<Figure> figures = new HashSet<>();
+
+        for (Figure f : this.getDiagramModel().getDiagramToView().getFigures()) {
+            boolean ok = false;
+            if (oldSelection.contains(f)) {
+                ok = true;
+            } else {
+                for (Figure succ : f.getPredecessors()) {
+                    if (oldSelection.contains(succ)) {
+                        ok = true;
+                        break;
+                    }
+                }
+            }
+
+            if (ok) {
+                figures.add(f);
+            }
+        }
+
+        getModel().showAll(figures);
+    }
+
+    public void showAll() {
+        getModel().showNot(new HashSet<Integer>());
+    }
+
+    public Diagram getDiagram() {
+        return getDiagramModel().getDiagramToView();
+    }
+
+    @Override
+    public void requestActive() {
+        super.requestActive();
+        viewer.getComponent().requestFocus();
+    }
+
+    @Override
+    public UndoRedo getUndoRedo() {
+        return viewer.getUndoRedo();
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/Editor/src/com/oracle/graal/visualizer/editor/ExportCookie.java	Wed Feb 01 18:29:28 2012 +0100
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 1998, 2007, 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * 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.oracle.graal.visualizer.editor;
+
+import java.io.File;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public interface ExportCookie {
+
+    void export(File f);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/Editor/src/com/oracle/graal/visualizer/editor/GraphViewerImplementation.java	Wed Feb 01 18:29:28 2012 +0100
@@ -0,0 +1,41 @@
+/*
+ * 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.oracle.graal.visualizer.editor;
+
+import com.sun.hotspot.igv.data.InputGraph;
+import com.sun.hotspot.igv.data.services.GraphViewer;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public class GraphViewerImplementation implements GraphViewer {
+
+    @Override
+    public void view(InputGraph graph) {
+        EditorTopComponent tc = new EditorTopComponent(graph);
+        tc.open();
+        tc.requestActive();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/Editor/src/com/oracle/graal/visualizer/editor/NodeQuickSearch.java	Wed Feb 01 18:29:28 2012 +0100
@@ -0,0 +1,142 @@
+/*
+ * 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.oracle.graal.visualizer.editor;
+
+import com.sun.hotspot.igv.data.InputNode;
+import com.sun.hotspot.igv.data.Properties;
+import com.sun.hotspot.igv.data.Properties.RegexpPropertyMatcher;
+import com.sun.hotspot.igv.data.services.InputGraphProvider;
+import com.sun.hotspot.igv.util.LookupHistory;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.regex.Pattern;
+import org.netbeans.spi.quicksearch.SearchProvider;
+import org.netbeans.spi.quicksearch.SearchRequest;
+import org.netbeans.spi.quicksearch.SearchResponse;
+import org.openide.DialogDisplayer;
+import org.openide.NotifyDescriptor;
+import org.openide.NotifyDescriptor.Message;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+public class NodeQuickSearch implements SearchProvider {
+
+    private static final String DEFAULT_PROPERTY = "name";
+
+    /**
+     * Method is called by infrastructure when search operation was requested.
+     * Implementors should evaluate given request and fill response object with
+     * apropriate results
+     *
+     * @param request Search request object that contains information what to search for
+     * @param response Search response object that stores search results. Note that it's important to react to return value of SearchResponse.addResult(...) method and stop computation if false value is returned.
+     */
+    @Override
+    public void evaluate(SearchRequest request, SearchResponse response) {
+        String query = request.getText();
+        if (query.trim().isEmpty()) {
+            return;
+        }
+
+        final String[] parts = query.split("=", 2);
+
+        String name;
+        String value;
+
+        if (parts.length == 1) {
+            name = DEFAULT_PROPERTY;
+            value = ".*" + Pattern.quote(parts[0]) + ".*";
+        } else {
+            name = parts[0];
+            value = parts[1];
+        }
+
+        if (value.isEmpty()) {
+            value = ".*";
+        }
+
+        final InputGraphProvider p = LookupHistory.getLast(InputGraphProvider.class);
+        if (p != null && p.getGraph() != null) {
+            List<InputNode> matches = null;
+            try {
+                RegexpPropertyMatcher matcher = new RegexpPropertyMatcher(name, value, Pattern.CASE_INSENSITIVE);
+                Properties.PropertySelector<InputNode> selector = new Properties.PropertySelector<>(p.getGraph().getNodes());
+
+                matches = selector.selectMultiple(matcher);
+            } catch (Exception e) {
+                final String msg = e.getMessage();
+                response.addResult(new Runnable() {
+                    @Override
+                        public void run() {
+                            Message desc = new NotifyDescriptor.Message("An exception occurred during the search, "
+                                    + "perhaps due to a malformed query string:\n" + msg,
+                                    NotifyDescriptor.WARNING_MESSAGE);
+                            DialogDisplayer.getDefault().notify(desc);
+                        }
+                    },
+                    "(Error during search)"
+                );
+            }
+
+            if (matches != null) {
+                final Set<InputNode> set = new HashSet<>(matches);
+                response.addResult(new Runnable() {
+                    @Override
+                        public void run() {
+                            final EditorTopComponent comp = EditorTopComponent.getActive();
+                            if (comp != null) {
+                                comp.setSelectedNodes(set);
+                                comp.requestActive();
+                            }
+                        }
+                    },
+                    "All " + matches.size() + " matching nodes (" + name + "=" + value + ")"
+                );
+
+                // Single matches
+                for (final InputNode n : matches) {
+                    response.addResult(new Runnable() {
+                        @Override
+                            public void run() {
+                                final EditorTopComponent comp = EditorTopComponent.getActive();
+                                if (comp != null) {
+                                    final Set<InputNode> tmpSet = new HashSet<>();
+                                    tmpSet.add(n);
+                                    comp.setSelectedNodes(tmpSet);
+                                    comp.requestActive();
+                                }
+                            }
+                        },
+                        n.getProperties().get(name) + " (" + n.getId() + " " + n.getProperties().get("name") + ")"
+                    );
+                }
+            }
+        } else {
+            System.out.println("no input graph provider!");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/Editor/src/com/oracle/graal/visualizer/editor/actions/NextDiagramAction.java	Wed Feb 01 18:29:28 2012 +0100
@@ -0,0 +1,112 @@
+/*
+ * 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.oracle.graal.visualizer.editor.actions;
+
+import com.sun.hotspot.igv.data.ChangedListener;
+import com.sun.hotspot.igv.util.ContextAction;
+import com.oracle.graal.visualizer.editor.DiagramViewModel;
+import javax.swing.Action;
+import javax.swing.ImageIcon;
+import org.openide.awt.ActionID;
+import org.openide.awt.ActionReference;
+import org.openide.awt.ActionRegistration;
+import org.openide.util.*;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+@ActionID(id = "com.oracle.graal.visualizer.editor.actions.NextDiagramAction", category = "View")
+@ActionRegistration(displayName = "Next snapshot")
+@ActionReference(path = "Menu/View", position = 150)
+public final class NextDiagramAction extends ContextAction<DiagramViewModel> implements ChangedListener<DiagramViewModel> {
+
+    private DiagramViewModel model;
+
+    public NextDiagramAction() {
+        this(Utilities.actionsGlobalContext());
+    }
+
+    public NextDiagramAction(Lookup lookup) {
+        putValue(Action.SHORT_DESCRIPTION, "Show next graph of current group");
+        putValue(Action.SMALL_ICON, new ImageIcon(ImageUtilities.loadImage("com/sun/hotspot/igv/view/images/next_diagram.png")));
+    }
+
+    @Override
+    public String getName() {
+        return "Next snapshot";
+    }
+
+    @Override
+    public HelpCtx getHelpCtx() {
+        return HelpCtx.DEFAULT_HELP;
+    }
+
+    @Override
+    public Class<DiagramViewModel> contextClass() {
+        return DiagramViewModel.class;
+    }
+
+    @Override
+    public void performAction(DiagramViewModel model) {
+        int fp = model.getFirstPosition();
+        int sp = model.getSecondPosition();
+        if (sp != model.getPositions().size() - 1) {
+            int nfp = fp + 1;
+            int nsp = sp + 1;
+            model.setPositions(nfp, nsp);
+        }
+    }
+
+    @Override
+    public void update(DiagramViewModel model) {
+        super.update(model);
+
+        if (this.model != model) {
+            if (this.model != null) {
+                this.model.getDiagramChangedEvent().removeListener(this);
+            }
+
+            this.model = model;
+            if (this.model != null) {
+                this.model.getDiagramChangedEvent().addListener(this);
+            }
+        }
+    }
+
+    @Override
+    public boolean isEnabled(DiagramViewModel model) {
+        return model.getSecondPosition() != model.getPositions().size() - 1;
+    }
+
+    @Override
+    public Action createContextAwareInstance(Lookup arg0) {
+        return new NextDiagramAction(arg0);
+    }
+
+    @Override
+    public void changed(DiagramViewModel source) {
+        update(source);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/Editor/src/com/oracle/graal/visualizer/editor/actions/PrevDiagramAction.java	Wed Feb 01 18:29:28 2012 +0100
@@ -0,0 +1,112 @@
+/*
+ * 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.oracle.graal.visualizer.editor.actions;
+
+import com.sun.hotspot.igv.data.ChangedListener;
+import com.sun.hotspot.igv.util.ContextAction;
+import com.oracle.graal.visualizer.editor.DiagramViewModel;
+import javax.swing.Action;
+import javax.swing.ImageIcon;
+import org.openide.awt.ActionID;
+import org.openide.awt.ActionReference;
+import org.openide.awt.ActionRegistration;
+import org.openide.util.*;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ */
+@ActionID(id = "com.oracle.graal.visualizer.editor.actions.PrevDiagramAction", category = "View")
+@ActionRegistration(displayName = "Previous snapshot")
+@ActionReference(path = "Menu/View", position = 100)
+public final class PrevDiagramAction extends ContextAction<DiagramViewModel> implements ChangedListener<DiagramViewModel> {
+
+    private DiagramViewModel model;
+
+    public PrevDiagramAction() {
+        this(Utilities.actionsGlobalContext());
+    }
+
+    public PrevDiagramAction(Lookup lookup) {
+        putValue(Action.SHORT_DESCRIPTION, "Show previous graph of current group");
+        putValue(Action.SMALL_ICON, new ImageIcon(ImageUtilities.loadImage("com/sun/hotspot/igv/view/images/prev_diagram.png")));
+    }
+
+    @Override
+    public String getName() {
+        return "Previous snapshot";
+    }
+
+    @Override
+    public HelpCtx getHelpCtx() {
+        return HelpCtx.DEFAULT_HELP;
+    }
+
+    @Override
+    public Class<DiagramViewModel> contextClass() {
+        return DiagramViewModel.class;
+    }
+
+    @Override
+    public void performAction(DiagramViewModel model) {
+        int fp = model.getFirstPosition();
+        int sp = model.getSecondPosition();
+        if (fp != 0) {
+            int nfp = fp - 1;
+            int nsp = sp - 1;
+            model.setPositions(nfp, nsp);
+        }
+    }
+
+    @Override
+    public void update(DiagramViewModel model) {
+        super.update(model);
+
+        if (this.model != model) {
+            if (this.model != null) {
+                this.model.getDiagramChangedEvent().removeListener(this);
+            }
+
+            this.model = model;
+            if (this.model != null) {
+                this.model.getDiagramChangedEvent().addListener(this);
+            }
+        }
+    }
+
+    @Override
+    public boolean isEnabled(DiagramViewModel model) {
+        return model.getFirstPosition() != 0;
+    }
+
+    @Override
+    public Action createContextAwareInstance(Lookup arg0) {
+        return new PrevDiagramAction(arg0);
+    }
+
+    @Override
+    public void changed(DiagramViewModel source) {
+        update(source);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/Editor/src/com/oracle/graal/visualizer/editor/layer.xml	Wed Feb 01 18:29:28 2012 +0100
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.1//EN" "http://www.netbeans.org/dtds/filesystem-1_1.dtd">
+<filesystem>
+    <folder name="Menu">
+        <folder name="File">
+            <file name="ExportActionSeparator.instance">
+                <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+                <attr name="position" intvalue="700"/>
+            </file>
+            <file name="com-oracle-graal-visualizer-editor-actions-ExportAction.shadow">
+                <attr name="originalFile" stringvalue="Actions/File/com-oracle-graal-visualizer-editor-actions-ExportAction.instance"/>
+                <attr name="position" intvalue="710"/>
+            </file>
+        </folder>
+    </folder>
+
+    <folder name="QuickSearch">
+        <folder name="Nodes">
+            <attr name="command" stringvalue="n"/>
+            <attr name="position" intvalue="0"/>
+            <file name="com-oracle-graal-visualizer-editor-NodeQuickSearch.instance"/>
+        </folder>
+    </folder>
+    
+    <folder name="QuickSearchShadow">
+        <file name="org-netbeans-modules-quicksearch-QuickSearchAction.shadow">
+            <attr name="originalFile" stringvalue="Actions/Edit/org-netbeans-modules-quicksearch-QuickSearchAction.instance"/>
+        </file>    
+    </folder>
+</filesystem>
--- a/src/share/tools/IdealGraphVisualizer/View/nbproject/project.xml	Wed Feb 01 17:48:37 2012 +0100
+++ b/src/share/tools/IdealGraphVisualizer/View/nbproject/project.xml	Wed Feb 01 18:29:28 2012 +0100
@@ -1,175 +1,183 @@
-<?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.view</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.difference</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.filter</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.graph</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.selectioncoordinator</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.settings</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.svg</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.netbeans.api.visual</code-name-base>
-                    <build-prerequisite/>
-                    <compile-dependency/>
-                    <run-dependency>
-                        <specification-version>2.27.1</specification-version>
-                    </run-dependency>
-                </dependency>
-                <dependency>
-                    <code-name-base>org.netbeans.spi.quicksearch</code-name-base>
-                    <build-prerequisite/>
-                    <compile-dependency/>
-                    <run-dependency>
-                        <specification-version>1.0</specification-version>
-                    </run-dependency>
-                </dependency>
-                <dependency>
-                    <code-name-base>org.openide.actions</code-name-base>
-                    <build-prerequisite/>
-                    <compile-dependency/>
-                    <run-dependency>
-                        <specification-version>6.21.1</specification-version>
-                    </run-dependency>
-                </dependency>
-                <dependency>
-                    <code-name-base>org.openide.awt</code-name-base>
-                    <build-prerequisite/>
-                    <compile-dependency/>
-                    <run-dependency>
-                        <specification-version>7.30.1</specification-version>
-                    </run-dependency>
-                </dependency>
-                <dependency>
-                    <code-name-base>org.openide.dialogs</code-name-base>
-                    <build-prerequisite/>
-                    <compile-dependency/>
-                    <run-dependency>
-                        <specification-version>7.18.1</specification-version>
-                    </run-dependency>
-                </dependency>
-                <dependency>
-                    <code-name-base>org.openide.loaders</code-name-base>
-                    <build-prerequisite/>
-                    <compile-dependency/>
-                    <run-dependency>
-                        <specification-version>7.20.1</specification-version>
-                    </run-dependency>
-                </dependency>
-                <dependency>
-                    <code-name-base>org.openide.nodes</code-name-base>
-                    <build-prerequisite/>
-                    <compile-dependency/>
-                    <run-dependency>
-                        <specification-version>7.20.1</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.39.1</specification-version>
-                    </run-dependency>
-                </dependency>
-            </module-dependencies>
-            <public-packages>
-                <package>com.sun.hotspot.igv.view</package>
-            </public-packages>
-        </data>
-    </configuration>
-</project>
+<?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.view</code-name-base>
+            <suite-component/>
+            <module-dependencies>
+                <dependency>
+                    <code-name-base>com.oracle.graal.visualizer.editor</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.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.difference</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.filter</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.graph</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.selectioncoordinator</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.settings</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.svg</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.netbeans.api.visual</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>2.27.1</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.spi.quicksearch</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>1.0</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.actions</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>6.21.1</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.awt</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>7.30.1</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.dialogs</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>7.18.1</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.loaders</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>7.20.1</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.nodes</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>7.20.1</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.39.1</specification-version>
+                    </run-dependency>
+                </dependency>
+            </module-dependencies>
+            <public-packages>
+                <package>com.sun.hotspot.igv.view</package>
+            </public-packages>
+        </data>
+    </configuration>
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/View/src/META-INF/services/com.oracle.graal.visualizer.editor.CompilationViewerFactory	Wed Feb 01 18:29:28 2012 +0100
@@ -0,0 +1,1 @@
+com.sun.hotspot.igv.view.scene.GraphCompilationViewerFactory
--- a/src/share/tools/IdealGraphVisualizer/View/src/META-INF/services/com.sun.hotspot.igv.data.services.GraphViewer	Wed Feb 01 17:48:37 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-com.sun.hotspot.igv.view.GraphViewerImplementation
--- a/src/share/tools/IdealGraphVisualizer/View/src/META-INF/services/com.sun.hotspot.igv.view.CompilationViewerFactory	Wed Feb 01 17:48:37 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-com.sun.hotspot.igv.view.scene.GraphCompilationViewerFactory
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/BoundedZoomAction.java	Wed Feb 01 17:48:37 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,175 +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;
-
-import java.awt.Container;
-import java.awt.Dimension;
-import java.awt.Point;
-import java.awt.Rectangle;
-import javax.swing.JComponent;
-import javax.swing.JScrollPane;
-import org.netbeans.api.visual.action.WidgetAction;
-import org.netbeans.api.visual.action.WidgetAction.State;
-import org.netbeans.api.visual.action.WidgetAction.WidgetMouseWheelEvent;
-import org.netbeans.api.visual.animator.SceneAnimator;
-import org.netbeans.api.visual.widget.Scene;
-import org.netbeans.api.visual.widget.Widget;
-
-/**
- *
- * @author Thomas Wuerthinger
- */
-public class BoundedZoomAction extends WidgetAction.Adapter {
-
-    private double minFactor = 0.0;
-    private double maxFactor = Double.MAX_VALUE;
-    private double zoomMultiplier;
-    private boolean useAnimator;
-
-    public BoundedZoomAction(double zoomMultiplier, boolean useAnimator) {
-        assert zoomMultiplier > 1.0;
-        this.zoomMultiplier = zoomMultiplier;
-        this.useAnimator = useAnimator;
-    }
-
-    public double getMinFactor() {
-        return minFactor;
-    }
-
-    public void setMinFactor(double d) {
-        minFactor = d;
-    }
-
-    public double getMaxFactor() {
-        return maxFactor;
-    }
-
-    public void setMaxFactor(double d) {
-        maxFactor = d;
-    }
-
-    private JScrollPane findScrollPane(JComponent component) {
-        for (;;) {
-            if (component == null) {
-                return null;
-            }
-            if (component instanceof JScrollPane) {
-                return ((JScrollPane) component);
-            }
-            Container parent = component.getParent();
-            if (!(parent instanceof JComponent)) {
-                return null;
-            }
-            component = (JComponent) parent;
-        }
-    }
-
-    @Override
-    public State mouseWheelMoved(Widget widget, WidgetMouseWheelEvent event) {
-        final Scene scene = widget.getScene();
-        int amount = event.getWheelRotation();
-        JScrollPane scrollPane = findScrollPane(scene.getView());
-        Point viewPosition = null;
-        Point mouseLocation = scene.convertSceneToView(event.getPoint());
-        int xOffset = 0;
-        int yOffset = 0;
-        Rectangle bounds = new Rectangle(scene.getBounds());
-        Dimension componentSize = new Dimension(scene.getView().getPreferredSize());
-        if (scrollPane != null) {
-            viewPosition = new Point(scrollPane.getViewport().getViewPosition());
-            xOffset = (mouseLocation.x - viewPosition.x);
-            yOffset = (mouseLocation.y - viewPosition.y);
-            viewPosition.x += xOffset;
-            viewPosition.y += yOffset;
-        }
-
-        if (useAnimator) {
-            SceneAnimator sceneAnimator = scene.getSceneAnimator();
-            synchronized (sceneAnimator) {
-                double zoom = sceneAnimator.isAnimatingZoomFactor() ? sceneAnimator.getTargetZoomFactor() : scene.getZoomFactor();
-                while (amount > 0 && zoom / zoomMultiplier >= minFactor) {
-                    zoom /= zoomMultiplier;
-                    if (viewPosition != null) {
-                        viewPosition.x /= zoomMultiplier;
-                        viewPosition.y /= zoomMultiplier;
-                        bounds.width /= zoomMultiplier;
-                        bounds.height /= zoomMultiplier;
-                        componentSize.width /= zoomMultiplier;
-                        componentSize.height /= zoomMultiplier;
-                    }
-                    amount--;
-                }
-                while (amount < 0 && zoom * zoomMultiplier <= maxFactor) {
-                    zoom *= zoomMultiplier;
-                    if (viewPosition != null) {
-                        viewPosition.x *= zoomMultiplier;
-                        viewPosition.y *= zoomMultiplier;
-                        bounds.width *= zoomMultiplier;
-                        bounds.height *= zoomMultiplier;
-                        componentSize.width *= zoomMultiplier;
-                        componentSize.height *= zoomMultiplier;
-                    }
-                    amount++;
-                }
-                sceneAnimator.animateZoomFactor(zoom);
-            }
-        } else {
-            double zoom = scene.getZoomFactor();
-            while (amount > 0 && zoom / zoomMultiplier >= minFactor) {
-                zoom /= zoomMultiplier;
-                if (viewPosition != null) {
-                    viewPosition.x /= zoomMultiplier;
-                    viewPosition.y /= zoomMultiplier;
-                    bounds.width /= zoomMultiplier;
-                    bounds.height /= zoomMultiplier;
-                    componentSize.width /= zoomMultiplier;
-                    componentSize.height /= zoomMultiplier;
-                }
-                amount--;
-            }
-            while (amount < 0 && zoom * zoomMultiplier <= maxFactor) {
-                zoom *= zoomMultiplier;
-                if (viewPosition != null) {
-                    viewPosition.x *= zoomMultiplier;
-                    viewPosition.y *= zoomMultiplier;
-                    bounds.width *= zoomMultiplier;
-                    bounds.height *= zoomMultiplier;
-                    componentSize.width *= zoomMultiplier;
-                    componentSize.height *= zoomMultiplier;
-                }
-                amount++;
-            }
-            scene.setZoomFactor(zoom);
-        }
-
-        if (scrollPane != null) {
-            viewPosition.x -= xOffset;
-            viewPosition.y -= yOffset;
-            scrollPane.getViewport().setViewPosition(viewPosition);
-        }
-
-
-        return WidgetAction.State.CONSUMED;
-    }
-}
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/Bundle.properties	Wed Feb 01 17:48:37 2012 +0100
+++ b/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/Bundle.properties	Wed Feb 01 18:29:28 2012 +0100
@@ -1,3 +1,1 @@
-HINT_EditorTopComponent=Visualizes a graph.
-OpenIDE-Module-Name=View
-CTL_EditorTopComponent=Graph
\ No newline at end of file
+OpenIDE-Module-Name=View
\ No newline at end of file
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/CompilationViewer.java	Wed Feb 01 17:48:37 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +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;
-
-import com.sun.hotspot.igv.graph.Figure;
-import java.awt.Component;
-import java.awt.Graphics2D;
-import java.util.Collection;
-import org.openide.awt.UndoRedo;
-import org.openide.util.Lookup;
-
-/**
- *
- * @author Thomas Wuerthinger
- */
-public interface CompilationViewer {
-
-    public Lookup getLookup();
-
-    public Component getComponent();
-    
-    public Component getToolBarComponent();
-
-    public UndoRedo getUndoRedo();
-
-    public void setSelection(Collection<Figure> list);
-
-    public void paint(Graphics2D svgGenerator);
-
-    public void zoomOut();
-
-    public void zoomIn();
-}
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/CompilationViewerFactory.java	Wed Feb 01 17:48:37 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*
- * Copyright (c) 2012, 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;
-
-public interface CompilationViewerFactory {
-    CompilationViewer createViewer(DiagramViewModel model);
-    String getName();
-}
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/DiagramViewModel.java	Wed Feb 01 17:48:37 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,388 +0,0 @@
-/*
- * Copyright (c) 1998, 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.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * 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;
-
-import com.sun.hotspot.igv.data.*;
-import com.sun.hotspot.igv.difference.Difference;
-import com.sun.hotspot.igv.filter.CustomFilter;
-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.settings.Settings;
-import com.sun.hotspot.igv.util.RangeSliderModel;
-import java.awt.Color;
-import java.util.*;
-
-/**
- *
- * @author Thomas Wuerthinger
- */
-public class DiagramViewModel extends RangeSliderModel implements ChangedListener<RangeSliderModel> {
-
-    // Warning: Update setData method if fields are added
-    private Group group;
-    private Set<Integer> hiddenNodes;
-    private Set<Integer> onScreenNodes;
-    private Set<Integer> selectedNodes;
-    private FilterChain filterChain;
-    private FilterChain sequenceFilterChain;
-    private Diagram diagram;
-    private InputGraph inputGraph;
-    private ChangedEvent<DiagramViewModel> groupChangedEvent;
-    private ChangedEvent<DiagramViewModel> diagramChangedEvent;
-    private ChangedEvent<DiagramViewModel> viewChangedEvent;
-    private ChangedEvent<DiagramViewModel> hiddenNodesChangedEvent;
-    private ChangedEvent<DiagramViewModel> viewPropertiesChangedEvent;
-    private boolean showNodeHull;
-    private ChangedListener<FilterChain> filterChainChangedListener = new ChangedListener<FilterChain>() {
-
-        @Override
-        public void changed(FilterChain source) {
-            diagramChanged();
-        }
-    };
-
-    @Override
-    public DiagramViewModel copy() {
-        DiagramViewModel result = new DiagramViewModel(group, filterChain, sequenceFilterChain);
-        result.setData(this);
-        return result;
-    }
-
-    public void setData(DiagramViewModel newModel) {
-        super.setData(newModel);
-        boolean diagramChanged = false;
-        boolean viewChanged = false;
-        boolean viewPropertiesChanged = false;
-
-        boolean groupChanged = (group == newModel.group);
-        this.group = newModel.group;
-        diagramChanged |= (filterChain != newModel.filterChain);
-        this.filterChain = newModel.filterChain;
-        diagramChanged |= (sequenceFilterChain != newModel.sequenceFilterChain);
-        this.sequenceFilterChain = newModel.sequenceFilterChain;
-        diagramChanged |= (diagram != newModel.diagram);
-        this.diagram = newModel.diagram;
-        viewChanged |= (hiddenNodes != newModel.hiddenNodes);
-        this.hiddenNodes = newModel.hiddenNodes;
-        viewChanged |= (onScreenNodes != newModel.onScreenNodes);
-        this.onScreenNodes = newModel.onScreenNodes;
-        viewChanged |= (selectedNodes != newModel.selectedNodes);
-        this.selectedNodes = newModel.selectedNodes;
-        viewPropertiesChanged |= (showNodeHull != newModel.showNodeHull);
-        this.showNodeHull = newModel.showNodeHull;
-
-        if (groupChanged) {
-            groupChangedEvent.fire();
-        }
-
-        if (diagramChanged) {
-            diagramChangedEvent.fire();
-        }
-        if (viewPropertiesChanged) {
-            viewPropertiesChangedEvent.fire();
-        }
-        if (viewChanged) {
-            viewChangedEvent.fire();
-        }
-    }
-
-    public boolean getShowNodeHull() {
-        return showNodeHull;
-    }
-
-    public void setShowNodeHull(boolean b) {
-        showNodeHull = b;
-        viewPropertiesChangedEvent.fire();
-    }
-
-    public DiagramViewModel(Group g, FilterChain filterChain, FilterChain sequenceFilterChain) {
-        super(calculateStringList(g));
-
-        this.showNodeHull = true;
-        this.group = g;
-        assert filterChain != null;
-        this.filterChain = filterChain;
-        assert sequenceFilterChain != null;
-        this.sequenceFilterChain = sequenceFilterChain;
-        hiddenNodes = new HashSet<>();
-        onScreenNodes = new HashSet<>();
-        selectedNodes = new HashSet<>();
-        super.getChangedEvent().addListener(this);
-        diagramChangedEvent = new ChangedEvent<>(this);
-        viewChangedEvent = new ChangedEvent<>(this);
-        hiddenNodesChangedEvent = new ChangedEvent<>(this);
-        viewPropertiesChangedEvent = new ChangedEvent<>(this);
-
-        groupChangedEvent = new ChangedEvent<>(this);
-        groupChangedEvent.addListener(groupChangedListener);
-        groupChangedEvent.fire();
-
-        filterChain.getChangedEvent().addListener(filterChainChangedListener);
-        sequenceFilterChain.getChangedEvent().addListener(filterChainChangedListener);
-    }
-    private final ChangedListener<DiagramViewModel> groupChangedListener = new ChangedListener<DiagramViewModel>() {
-
-        private Group oldGroup;
-
-        @Override
-        public void changed(DiagramViewModel source) {
-            if (oldGroup != null) {
-                oldGroup.getChangedEvent().removeListener(groupContentChangedListener);
-            }
-            group.getChangedEvent().addListener(groupContentChangedListener);
-            oldGroup = group;
-        }
-    };
-    private final ChangedListener<Group> groupContentChangedListener = new ChangedListener<Group>() {
-
-        @Override
-        public void changed(Group source) {
-            assert source == group;
-            setPositions(calculateStringList(source));
-            setSelectedNodes(selectedNodes);
-        }
-    };
-
-    public ChangedEvent<DiagramViewModel> getDiagramChangedEvent() {
-        return diagramChangedEvent;
-    }
-
-    public ChangedEvent<DiagramViewModel> getViewChangedEvent() {
-        return viewChangedEvent;
-    }
-
-    public ChangedEvent<DiagramViewModel> getHiddenNodesChangedEvent() {
-        return hiddenNodesChangedEvent;
-    }
-
-    public ChangedEvent<DiagramViewModel> getViewPropertiesChangedEvent() {
-        return viewPropertiesChangedEvent;
-    }
-
-    public Set<Integer> getSelectedNodes() {
-        return selectedNodes;
-    }
-
-    public Set<Integer> getHiddenNodes() {
-        return hiddenNodes;
-    }
-
-    public Set<Integer> getOnScreenNodes() {
-        return onScreenNodes;
-    }
-
-    public void setSelectedNodes(Set<Integer> nodes) {
-        this.selectedNodes = nodes;
-        List<Color> colors = new ArrayList<>();
-        for (String s : getPositions()) {
-            colors.add(Color.black);
-        }
-        if (nodes.size() >= 1) {
-            for (Integer id : nodes) {
-                if (id < 0) {
-                    id = -id;
-                }
-                InputNode last = null;
-                int index = 0;
-                for (InputGraph g : group.getGraphs()) {
-                    Color curColor = colors.get(index);
-                    InputNode cur = g.getNode(id);
-                    if (cur != null) {
-                        if (last == null) {
-                            curColor = Color.green;
-                        } else {
-                            if (last.equals(cur)) {
-                                if (curColor == Color.black) {
-                                    curColor = Color.white;
-                                }
-                            } else {
-                                if (curColor != Color.green) {
-                                    curColor = Color.orange;
-                                }
-                            }
-                        }
-                    }
-                    last = cur;
-                    colors.set(index, curColor);
-                    index++;
-                }
-            }
-        }
-        setColors(colors);
-        viewChangedEvent.fire();
-    }
-
-    public void showNot(final Set<Integer> nodes) {
-        System.out.println("Shownot called with " + nodes);
-        setHiddenNodes(nodes);
-    }
-
-    public void showFigures(Collection<Figure> f) {
-        HashSet<Integer> newHiddenNodes = new HashSet<>(getHiddenNodes());
-        for (Figure fig : f) {
-            newHiddenNodes.removeAll(fig.getSource().getSourceNodesAsSet());
-        }
-        setHiddenNodes(newHiddenNodes);
-    }
-
-
-    public Set<Figure> getSelectedFigures() {
-        Set<Figure> result = new HashSet<>();
-        for (Figure f : diagram.getFigures()) {
-            for (InputNode node : f.getSource().getSourceNodes()) {
-                if (getSelectedNodes().contains(node.getId())) {
-                    result.add(f);
-                }
-            }
-        }
-        return result;
-    }
-
-    public void showAll(final Collection<Figure> f) {
-        showFigures(f);
-    }
-
-    public void showOnly(final Set<Integer> nodes) {
-        final HashSet<Integer> allNodes = new HashSet<>(getGraphToView().getGroup().getAllNodes());
-        allNodes.removeAll(nodes);
-        setHiddenNodes(allNodes);
-    }
-
-    public void setHiddenNodes(Set<Integer> nodes) {
-        this.hiddenNodes = nodes;
-        hiddenNodesChangedEvent.fire();
-    }
-
-    public void setOnScreenNodes(Set<Integer> onScreenNodes) {
-        this.onScreenNodes = onScreenNodes;
-        viewChangedEvent.fire();
-    }
-
-    public FilterChain getSequenceFilterChain() {
-        return filterChain;
-    }
-
-    public void setSequenceFilterChain(FilterChain chain) {
-        assert chain != null : "sequenceFilterChain must never be null";
-        sequenceFilterChain.getChangedEvent().removeListener(filterChainChangedListener);
-        sequenceFilterChain = chain;
-        sequenceFilterChain.getChangedEvent().addListener(filterChainChangedListener);
-        diagramChanged();
-    }
-
-    private void diagramChanged() {
-        // clear diagram
-        diagram = null;
-        getDiagramChangedEvent().fire();
-
-    }
-
-    public FilterChain getFilterChain() {
-        return filterChain;
-    }
-
-    public void setFilterChain(FilterChain chain) {
-        assert chain != null : "filterChain must never be null";
-        filterChain.getChangedEvent().removeListener(filterChainChangedListener);
-        filterChain = chain;
-        filterChain.getChangedEvent().addListener(filterChainChangedListener);
-        diagramChanged();
-    }
-
-    private static List<String> calculateStringList(Group g) {
-        List<String> result = new ArrayList<>();
-        for (InputGraph graph : g.getGraphs()) {
-            result.add(graph.getName());
-        }
-        return result;
-    }
-
-    public InputGraph getFirstGraph() {
-        List<InputGraph> graphs = group.getGraphs();
-        if (getFirstPosition() < graphs.size()) {
-            return graphs.get(getFirstPosition());
-        }
-        return graphs.get(graphs.size() - 1);
-    }
-
-    public InputGraph getSecondGraph() {
-        List<InputGraph> graphs = group.getGraphs();
-        if (getSecondPosition() < graphs.size()) {
-            return graphs.get(getSecondPosition());
-        }
-        return getFirstGraph();
-    }
-
-    public void selectGraph(InputGraph g) {
-        int index = group.getGraphs().indexOf(g);
-        assert index != -1;
-        setPositions(index, index);
-    }
-
-    public Diagram getDiagramToView() {
-
-        if (diagram == null) {
-            diagram = Diagram.createDiagram(getGraphToView(), Settings.get().get(Settings.NODE_TEXT, Settings.NODE_TEXT_DEFAULT));
-            getFilterChain().apply(diagram, getSequenceFilterChain());
-            if (getFirstPosition() != getSecondPosition()) {
-                CustomFilter f = new CustomFilter(
-                        "difference", "colorize('state', 'same', white);"
-                        + "colorize('state', 'changed', orange);"
-                        + "colorize('state', 'new', green);"
-                        + "colorize('state', 'deleted', red);");
-                f.apply(diagram);
-           }
-        }
-
-        return diagram;
-    }
-
-    public InputGraph getGraphToView() {
-        if (inputGraph == null) {
-            if (getFirstGraph() != getSecondGraph()) {
-                inputGraph = Difference.createDiffGraph(getFirstGraph(), getSecondGraph());
-            } else {
-                inputGraph = getFirstGraph();
-            }
-        }
-
-        return inputGraph;
-    }
-
-    @Override
-    public void changed(RangeSliderModel source) {
-        inputGraph = null;
-        diagramChanged();
-    }
-
-    void setSelectedFigures(List<Figure> list) {
-        Set<Integer> newSelectedNodes = new HashSet<>();
-        for (Figure f : list) {
-            newSelectedNodes.addAll(f.getSource().getSourceNodesAsSet());
-        }
-        this.setSelectedNodes(newSelectedNodes);
-    }
-}
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/EditorInputGraphProvider.java	Wed Feb 01 17:48:37 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 1998, 2007, 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.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * 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;
-
-import com.sun.hotspot.igv.data.InputGraph;
-import com.sun.hotspot.igv.data.InputNode;
-import com.sun.hotspot.igv.data.services.InputGraphProvider;
-import java.util.Set;
-
-/**
- *
- * @author Thomas Wuerthinger
- */
-public class EditorInputGraphProvider implements InputGraphProvider {
-
-    private EditorTopComponent editor;
-    
-    public EditorInputGraphProvider(EditorTopComponent editor) {
-        this.editor = editor;
-    }
-    
-    @Override
-    public InputGraph getGraph() {
-        return editor.getDiagramModel().getGraphToView();
-    }
-
-    @Override
-    public void setSelectedNodes(Set<InputNode> nodes) {
-        editor.setSelectedNodes(nodes);
-    }
-}
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/EditorTopComponent.form	Wed Feb 01 17:48:37 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<Form version="1.2" maxVersion="1.2" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
-  <NonVisualComponents>
-    <Component class="javax.swing.JCheckBox" name="jCheckBox1">
-      <Properties>
-        <Property name="text" type="java.lang.String" value="jCheckBox1"/>
-        <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
-          <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
-            <EmptyBorder bottom="0" left="0" right="0" top="0"/>
-          </Border>
-        </Property>
-        <Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
-          <Insets value="[0, 0, 0, 0]"/>
-        </Property>
-      </Properties>
-    </Component>
-  </NonVisualComponents>
-  <AuxValues>
-    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
-    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
-    <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
-    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
-    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
-    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/>
-    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
-    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
-    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
-    <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/>
-  </AuxValues>
-
-  <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
-</Form>
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/EditorTopComponent.java	Wed Feb 01 17:48:37 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,360 +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;
-
-import com.sun.hotspot.igv.data.*;
-import com.sun.hotspot.igv.view.scene.DiagramScene;
-import com.sun.hotspot.igv.data.Properties;
-import com.sun.hotspot.igv.data.Properties.PropertyMatcher;
-import com.sun.hotspot.igv.data.services.InputGraphProvider;
-import com.sun.hotspot.igv.filter.FilterChain;
-import com.sun.hotspot.igv.filter.FilterChainProvider;
-import com.sun.hotspot.igv.graph.Diagram;
-import com.sun.hotspot.igv.graph.Figure;
-import com.sun.hotspot.igv.graph.services.DiagramProvider;
-import com.sun.hotspot.igv.svg.BatikSVG;
-import com.sun.hotspot.igv.util.LookupHistory;
-import com.sun.hotspot.igv.util.RangeSlider;
-import com.sun.hotspot.igv.view.actions.*;
-import java.awt.*;
-import java.awt.event.HierarchyBoundsListener;
-import java.awt.event.HierarchyEvent;
-import java.awt.event.KeyEvent;
-import java.awt.event.KeyListener;
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-import java.io.*;
-import java.util.List;
-import java.util.*;
-import javax.swing.*;
-import javax.swing.border.Border;
-import org.openide.DialogDisplayer;
-import org.openide.NotifyDescriptor;
-import org.openide.actions.RedoAction;
-import org.openide.actions.UndoAction;
-import org.openide.awt.Toolbar;
-import org.openide.awt.ToolbarPool;
-import org.openide.awt.UndoRedo;
-import org.openide.util.Lookup;
-import org.openide.util.NbBundle;
-import org.openide.util.Utilities;
-import org.openide.util.actions.Presenter;
-import org.openide.util.lookup.AbstractLookup;
-import org.openide.util.lookup.InstanceContent;
-import org.openide.util.lookup.ProxyLookup;
-import org.openide.windows.Mode;
-import org.openide.windows.TopComponent;
-import org.openide.windows.WindowManager;
-
-/**
- * 
- * @author Thomas Wuerthinger
- */
-public final class EditorTopComponent extends TopComponent {
-
-    private InstanceContent content;
-    private InstanceContent graphContent;
-    private RangeSlider rangeSlider;
-    private static final String PREFERRED_ID = "EditorTopComponent";
-    private DiagramViewModel rangeSliderModel;
-    private CompilationViewer viewer;
-    
-
-    private DiagramProvider diagramProvider = new DiagramProvider() {
-
-        @Override
-        public Diagram getDiagram() {
-            return getModel().getDiagramToView();
-        }
-
-        @Override
-        public ChangedEvent<DiagramProvider> getChangedEvent() {
-            return diagramChangedEvent;
-        }
-    };
-
-    private ChangedEvent<DiagramProvider> diagramChangedEvent = new ChangedEvent<>(diagramProvider);
-    
-
-    private void updateDisplayName() {
-        setDisplayName(getDiagram().getName());
-    }
-
-    public EditorTopComponent(InputGraph graph) {
-
-        LookupHistory.init(InputGraphProvider.class);
-        LookupHistory.init(DiagramProvider.class);
-        this.setFocusable(true);
-        FilterChain filterChain;
-        FilterChain sequence;
-        FilterChainProvider provider = Lookup.getDefault().lookup(FilterChainProvider.class);
-        if (provider == null) {
-            filterChain = new FilterChain();
-            sequence = new FilterChain();
-        } else {
-            filterChain = provider.getFilterChain();
-            sequence = provider.getSequence();
-        }
-
-        setName(NbBundle.getMessage(EditorTopComponent.class, "CTL_EditorTopComponent"));
-        setToolTipText(NbBundle.getMessage(EditorTopComponent.class, "HINT_EditorTopComponent"));
-
-        initComponents();
-
-        ToolbarPool.getDefault().setPreferredIconSize(16);
-        Toolbar toolBar = new Toolbar();
-        Border b = (Border) UIManager.get("Nb.Editor.Toolbar.border"); //NOI18N
-        toolBar.setBorder(b);
-        this.add(BorderLayout.NORTH, toolBar);
-
-        rangeSliderModel = new DiagramViewModel(graph.getGroup(), filterChain, sequence);
-        rangeSlider = new RangeSlider();
-        rangeSlider.setModel(rangeSliderModel);
-
-        CompilationViewerFactory factory = Lookup.getDefault().lookup(CompilationViewerFactory.class);
-        viewer = factory.createViewer(rangeSliderModel);
-        content = new InstanceContent();
-        graphContent = new InstanceContent();
-        this.associateLookup(new ProxyLookup(new Lookup[]{viewer.getLookup(), new AbstractLookup(graphContent), new AbstractLookup(content)}));
-        content.add(rangeSliderModel);
-        content.add(diagramProvider);
-
-        rangeSliderModel.getDiagramChangedEvent().addListener(diagramChangedListener);
-        rangeSliderModel.selectGraph(graph);
-
-        toolBar.add(PrevDiagramAction.get(PrevDiagramAction.class));
-        toolBar.add(NextDiagramAction.get(NextDiagramAction.class));
-
-        toolBar.addSeparator();
-        toolBar.add(UndoAction.get(UndoAction.class));
-        toolBar.add(RedoAction.get(RedoAction.class));
-
-        toolBar.addSeparator();
-
-        Action action = Utilities.actionsForPath("QuickSearchShadow").get(0);
-        Component quicksearch = ((Presenter.Toolbar) action).getToolbarPresenter();
-        quicksearch.setMinimumSize(quicksearch.getPreferredSize()); // necessary for GTK LAF
-        toolBar.add(quicksearch);
-
-        toolBar.add(Box.createHorizontalGlue());        
-        toolBar.add(viewer.getToolBarComponent());
-
-        JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,
-                           new JScrollPane(rangeSlider), viewer.getComponent());
-        splitPane.setOneTouchExpandable(true);
-        splitPane.setDividerLocation(250);
-        this.add(splitPane, BorderLayout.CENTER);
-        
-        updateDisplayName();
-    }
-
-    public DiagramViewModel getDiagramModel() {
-        return rangeSliderModel;
-    }
-
-    public void showPrevDiagram() {
-        int fp = getModel().getFirstPosition();
-        int sp = getModel().getSecondPosition();
-        if (fp != 0) {
-            fp--;
-            sp--;
-            getModel().setPositions(fp, sp);
-        }
-    }
-
-    public DiagramViewModel getModel() {
-        return rangeSliderModel;
-    }
-
-    public FilterChain getFilterChain() {
-        return getModel().getFilterChain();
-    }
-
-    public static EditorTopComponent getActive() {
-        Set<? extends Mode> modes = WindowManager.getDefault().getModes();
-        for (Mode m : modes) {
-            TopComponent tc = m.getSelectedTopComponent();
-            if (tc instanceof EditorTopComponent) {
-                return (EditorTopComponent) tc;
-            }
-        }
-        return null;
-    }
-
-    /** This method is called from within the constructor to
-     * initialize the form.
-     * WARNING: Do NOT modify this code. The content of this method is
-     * always regenerated by the Form Editor.
-     */
-        // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
-        private void initComponents() {
-                jCheckBox1 = new javax.swing.JCheckBox();
-
-                org.openide.awt.Mnemonics.setLocalizedText(jCheckBox1, "jCheckBox1");
-                jCheckBox1.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
-                jCheckBox1.setMargin(new java.awt.Insets(0, 0, 0, 0));
-
-                setLayout(new java.awt.BorderLayout());
-
-        }// </editor-fold>//GEN-END:initComponents
-        // Variables declaration - do not modify//GEN-BEGIN:variables
-        private javax.swing.JCheckBox jCheckBox1;
-        // End of variables declaration//GEN-END:variables
-
-    @Override
-    public int getPersistenceType() {
-        return TopComponent.PERSISTENCE_NEVER;
-    }
-
-    @Override
-    public void componentOpened() {
-    }
-
-    @Override
-    public void componentClosed() {
-    }
-
-    @Override
-    protected String preferredID() {
-        return PREFERRED_ID;
-    }
-
-    private ChangedListener<DiagramViewModel> diagramChangedListener = new ChangedListener<DiagramViewModel>() {
-
-        @Override
-        public void changed(DiagramViewModel source) {
-            updateDisplayName();
-            Collection<Object> list = new ArrayList<>();
-            list.add(new EditorInputGraphProvider(EditorTopComponent.this));
-            graphContent.set(list, null);
-            diagramProvider.getChangedEvent().fire();
-        }
-        
-    };
-
-    public void setSelectedFigures(List<Figure> list) {
-        viewer.setSelection(list);
-    }
-
-    public void setSelectedNodes(Set<InputNode> nodes) {
-
-        List<Figure> list = new ArrayList<>();
-        Set<Integer> ids = new HashSet<>();
-        for (InputNode n : nodes) {
-            ids.add(n.getId());
-        }
-
-        for (Figure f : getModel().getDiagramToView().getFigures()) {
-            for (InputNode n : f.getSource().getSourceNodes()) {
-                if (ids.contains(n.getId())) {
-                    list.add(f);
-                    break;
-                }
-            }
-        }
-
-        setSelectedFigures(list);
-    }
-
-    public void extract() {
-        getModel().showOnly(getModel().getSelectedNodes());
-    }
-
-    public void hideNodes() {
-        Set<Integer> selectedNodes = this.getModel().getSelectedNodes();
-        HashSet<Integer> nodes = new HashSet<>(getModel().getHiddenNodes());
-        nodes.addAll(selectedNodes);
-        this.getModel().showNot(nodes);
-    }
-
-    public void expandPredecessors() {
-        Set<Figure> oldSelection = getModel().getSelectedFigures();
-        Set<Figure> figures = new HashSet<>();
-
-        for (Figure f : this.getDiagramModel().getDiagramToView().getFigures()) {
-            boolean ok = false;
-            if (oldSelection.contains(f)) {
-                ok = true;
-            } else {
-                for (Figure pred : f.getSuccessors()) {
-                    if (oldSelection.contains(pred)) {
-                        ok = true;
-                        break;
-                    }
-                }
-            }
-
-            if (ok) {
-                figures.add(f);
-            }
-        }
-
-        getModel().showAll(figures);
-    }
-
-    public void expandSuccessors() {
-        Set<Figure> oldSelection = getModel().getSelectedFigures();
-        Set<Figure> figures = new HashSet<>();
-
-        for (Figure f : this.getDiagramModel().getDiagramToView().getFigures()) {
-            boolean ok = false;
-            if (oldSelection.contains(f)) {
-                ok = true;
-            } else {
-                for (Figure succ : f.getPredecessors()) {
-                    if (oldSelection.contains(succ)) {
-                        ok = true;
-                        break;
-                    }
-                }
-            }
-
-            if (ok) {
-                figures.add(f);
-            }
-        }
-
-        getModel().showAll(figures);
-    }
-
-    public void showAll() {
-        getModel().showNot(new HashSet<Integer>());
-    }
-
-    public Diagram getDiagram() {
-        return getDiagramModel().getDiagramToView();
-    }
-
-    @Override
-    public void requestActive() {
-        super.requestActive();
-        viewer.getComponent().requestFocus();
-    }
-
-    @Override
-    public UndoRedo getUndoRedo() {
-        return viewer.getUndoRedo();
-    }
-
-}
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/ExportCookie.java	Wed Feb 01 17:48:37 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 1998, 2007, 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.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * 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;
-
-import java.io.File;
-
-/**
- *
- * @author Thomas Wuerthinger
- */
-public interface ExportCookie {
-
-    void export(File f);
-}
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/ExtendedSatelliteComponent.java	Wed Feb 01 17:48:37 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,218 +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;
-
-import com.sun.hotspot.igv.view.scene.DiagramScene;
-import java.awt.*;
-import java.awt.event.*;
-import javax.swing.JComponent;
-import org.netbeans.api.visual.widget.Scene;
-
-/**
- * @author David Kaspar
- * @author Thomas Wuerthinger
- */
-public class ExtendedSatelliteComponent extends JComponent implements MouseListener, MouseMotionListener, Scene.SceneListener, ComponentListener {
-
-    private DiagramScene scene;
-    private Image image;
-    private int imageWidth;
-    private int imageHeight;
-
-    public ExtendedSatelliteComponent(DiagramScene scene) {
-        this.scene = scene;
-        setDoubleBuffered(true);
-        setPreferredSize(new Dimension(128, 128));
-        addMouseListener(this);
-        addMouseMotionListener(this);
-    }
-
-    @Override
-    public void addNotify() {
-        super.addNotify();
-        scene.addSceneListener(this);
-        JComponent viewComponent = scene.getView();
-        if (viewComponent == null) {
-            viewComponent = scene.createView();
-        }
-        viewComponent.addComponentListener(this);
-        repaint();
-    }
-
-    @Override
-    public void removeNotify() {
-        scene.getView().removeComponentListener(this);
-        scene.removeSceneListener(this);
-        super.removeNotify();
-    }
-
-    public void update() {
-        this.image = null;
-        if (this.isVisible()) {
-            repaint();
-            revalidate();
-            validate();
-        }
-    }
-
-    @Override
-    public void paint(Graphics g) {
-        Graphics2D gr = (Graphics2D) g;
-        super.paint(g);
-        Rectangle bounds = scene.getBounds();
-        Dimension size = getSize();
-
-        double sx = bounds.width > 0 ? (double) size.width / bounds.width : 0.0;
-        double sy = bounds.width > 0 ? (double) size.height / bounds.height : 0.0;
-        double scale = Math.min(sx, sy);
-
-        int vw = (int) (scale * bounds.width);
-        int vh = (int) (scale * bounds.height);
-        int vx = (size.width - vw) / 2;
-        int vy = (size.height - vh) / 2;
-
-
-        if (image == null || vw != imageWidth || vh != imageHeight) {
-
-            imageWidth = vw;
-            imageHeight = vh;
-            image = this.createImage(imageWidth, imageHeight);
-            Graphics2D ig = (Graphics2D) image.getGraphics();
-            ig.scale(scale, scale);
-	    double oldFactor = scene.getZoomFactor();
-	    scene.setZoomFactor(scale);
-            scene.paint(ig);
-	    scene.setZoomFactor(oldFactor);
-        }
-
-        gr.drawImage(image, vx, vy, this);
-
-        JComponent component = scene.getView();
-        double zoomFactor = scene.getZoomFactor();
-        Rectangle viewRectangle = component != null ? component.getVisibleRect() : null;
-        if (viewRectangle != null) {
-            Rectangle window = new Rectangle(
-                    (int) ((double) viewRectangle.x * scale / zoomFactor),
-                    (int) ((double) viewRectangle.y * scale / zoomFactor),
-                    (int) ((double) viewRectangle.width * scale / zoomFactor),
-                    (int) ((double) viewRectangle.height * scale / zoomFactor));
-            window.translate(vx, vy);
-            gr.setColor(new Color(200, 200, 200, 128));
-            gr.fill(window);
-            gr.setColor(Color.BLACK);
-            gr.drawRect(window.x, window.y, window.width - 1, window.height - 1);
-        }
-    }
-
-    @Override
-    public void mouseClicked(MouseEvent e) {
-    }
-
-    @Override
-    public void mousePressed(MouseEvent e) {
-        moveVisibleRect(e.getPoint());
-    }
-
-    @Override
-    public void mouseReleased(MouseEvent e) {
-        moveVisibleRect(e.getPoint());
-    }
-
-    @Override
-    public void mouseEntered(MouseEvent e) {
-    }
-
-    @Override
-    public void mouseExited(MouseEvent e) {
-    }
-
-    @Override
-    public void mouseDragged(MouseEvent e) {
-        moveVisibleRect(e.getPoint());
-    }
-
-    @Override
-    public void mouseMoved(MouseEvent e) {
-    }
-
-    private void moveVisibleRect(Point center) {
-        JComponent component = scene.getView();
-        if (component == null) {
-            return;
-        }
-        double zoomFactor = scene.getZoomFactor();
-        Rectangle bounds = scene.getBounds();
-        Dimension size = getSize();
-
-        double sx = bounds.width > 0 ? (double) size.width / bounds.width : 0.0;
-        double sy = bounds.width > 0 ? (double) size.height / bounds.height : 0.0;
-        double scale = Math.min(sx, sy);
-
-        int vw = (int) (scale * bounds.width);
-        int vh = (int) (scale * bounds.height);
-        int vx = (size.width - vw) / 2;
-        int vy = (size.height - vh) / 2;
-
-        int cx = (int) ((double) (center.x - vx) / scale * zoomFactor);
-        int cy = (int) ((double) (center.y - vy) / scale * zoomFactor);
-
-        Rectangle visibleRect = component.getVisibleRect();
-        visibleRect.x = cx - visibleRect.width / 2;
-        visibleRect.y = cy - visibleRect.height / 2;
-        component.scrollRectToVisible(visibleRect);
-
-        this.repaint();
-    }
-
-    @Override
-    public void sceneRepaint() {
-    //repaint ();
-    }
-
-    @Override
-    public void sceneValidating() {
-    }
-
-    @Override
-    public void sceneValidated() {
-    }
-
-    @Override
-    public void componentResized(ComponentEvent e) {
-        repaint();
-    }
-
-    @Override
-    public void componentMoved(ComponentEvent e) {
-        repaint();
-    }
-
-    @Override
-    public void componentShown(ComponentEvent e) {
-    }
-
-    @Override
-    public void componentHidden(ComponentEvent e) {
-    }
-}
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/GraphViewerImplementation.java	Wed Feb 01 17:48:37 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +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;
-
-import com.sun.hotspot.igv.data.InputGraph;
-import com.sun.hotspot.igv.data.services.GraphViewer;
-
-/**
- *
- * @author Thomas Wuerthinger
- */
-public class GraphViewerImplementation implements GraphViewer {
-
-    @Override
-    public void view(InputGraph graph) {
-        EditorTopComponent tc = new EditorTopComponent(graph);
-        tc.open();
-        tc.requestActive();
-    }
-}
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/NodeQuickSearch.java	Wed Feb 01 17:48:37 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +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;
-
-import com.sun.hotspot.igv.data.InputNode;
-import com.sun.hotspot.igv.data.Properties;
-import com.sun.hotspot.igv.data.Properties.RegexpPropertyMatcher;
-import com.sun.hotspot.igv.data.services.InputGraphProvider;
-import com.sun.hotspot.igv.util.LookupHistory;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.regex.Pattern;
-import org.netbeans.spi.quicksearch.SearchProvider;
-import org.netbeans.spi.quicksearch.SearchRequest;
-import org.netbeans.spi.quicksearch.SearchResponse;
-import org.openide.DialogDisplayer;
-import org.openide.NotifyDescriptor;
-import org.openide.NotifyDescriptor.Message;
-
-/**
- *
- * @author Thomas Wuerthinger
- */
-public class NodeQuickSearch implements SearchProvider {
-
-    private static final String DEFAULT_PROPERTY = "name";
-
-    /**
-     * Method is called by infrastructure when search operation was requested.
-     * Implementors should evaluate given request and fill response object with
-     * apropriate results
-     *
-     * @param request Search request object that contains information what to search for
-     * @param response Search response object that stores search results. Note that it's important to react to return value of SearchResponse.addResult(...) method and stop computation if false value is returned.
-     */
-    @Override
-    public void evaluate(SearchRequest request, SearchResponse response) {
-        String query = request.getText();
-        if (query.trim().isEmpty()) {
-            return;
-        }
-
-        final String[] parts = query.split("=", 2);
-
-        String name;
-        String value;
-
-        if (parts.length == 1) {
-            name = DEFAULT_PROPERTY;
-            value = ".*" + Pattern.quote(parts[0]) + ".*";
-        } else {
-            name = parts[0];
-            value = parts[1];
-        }
-
-        if (value.isEmpty()) {
-            value = ".*";
-        }
-
-        final InputGraphProvider p = LookupHistory.getLast(InputGraphProvider.class);
-        if (p != null && p.getGraph() != null) {
-            List<InputNode> matches = null;
-            try {
-                RegexpPropertyMatcher matcher = new RegexpPropertyMatcher(name, value, Pattern.CASE_INSENSITIVE);
-                Properties.PropertySelector<InputNode> selector = new Properties.PropertySelector<>(p.getGraph().getNodes());
-
-                matches = selector.selectMultiple(matcher);
-            } catch (Exception e) {
-                final String msg = e.getMessage();
-                response.addResult(new Runnable() {
-                    @Override
-                        public void run() {
-                            Message desc = new NotifyDescriptor.Message("An exception occurred during the search, "
-                                    + "perhaps due to a malformed query string:\n" + msg,
-                                    NotifyDescriptor.WARNING_MESSAGE);
-                            DialogDisplayer.getDefault().notify(desc);
-                        }
-                    },
-                    "(Error during search)"
-                );
-            }
-
-            if (matches != null) {
-                final Set<InputNode> set = new HashSet<>(matches);
-                response.addResult(new Runnable() {
-                    @Override
-                        public void run() {
-                            final EditorTopComponent comp = EditorTopComponent.getActive();
-                            if (comp != null) {
-                                comp.setSelectedNodes(set);
-                                comp.requestActive();
-                            }
-                        }
-                    },
-                    "All " + matches.size() + " matching nodes (" + name + "=" + value + ")"
-                );
-
-                // Single matches
-                for (final InputNode n : matches) {
-                    response.addResult(new Runnable() {
-                        @Override
-                            public void run() {
-                                final EditorTopComponent comp = EditorTopComponent.getActive();
-                                if (comp != null) {
-                                    final Set<InputNode> tmpSet = new HashSet<>();
-                                    tmpSet.add(n);
-                                    comp.setSelectedNodes(tmpSet);
-                                    comp.requestActive();
-                                }
-                            }
-                        },
-                        n.getProperties().get(name) + " (" + n.getId() + " " + n.getProperties().get("name") + ")"
-                    );
-                }
-            }
-        } else {
-            System.out.println("no input graph provider!");
-        }
-    }
-}
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/actions/Bundle.properties	Wed Feb 01 17:48:37 2012 +0100
+++ b/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/actions/Bundle.properties	Wed Feb 01 18:29:28 2012 +0100
@@ -1,6 +1,4 @@
 CTL_EditorAction=Open Editor Window
-CTL_NextDiagramAction=Show next graph
 CTL_EnableBlockLayoutAction=Enable block layout
 CTL_NodeFindAction=Find
-CTL_PrevDiagramAction=Show previous graph
 CTL_ExportAction=Export current graph...
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/actions/ExpandPredecessorsAction.java	Wed Feb 01 17:48:37 2012 +0100
+++ b/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/actions/ExpandPredecessorsAction.java	Wed Feb 01 18:29:28 2012 +0100
@@ -23,7 +23,7 @@
  */
 package com.sun.hotspot.igv.view.actions;
 
-import com.sun.hotspot.igv.view.EditorTopComponent;
+import com.oracle.graal.visualizer.editor.EditorTopComponent;
 import org.openide.util.HelpCtx;
 import org.openide.util.actions.CallableSystemAction;
 
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/actions/ExpandSuccessorsAction.java	Wed Feb 01 17:48:37 2012 +0100
+++ b/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/actions/ExpandSuccessorsAction.java	Wed Feb 01 18:29:28 2012 +0100
@@ -23,7 +23,7 @@
  */
 package com.sun.hotspot.igv.view.actions;
 
-import com.sun.hotspot.igv.view.EditorTopComponent;
+import com.oracle.graal.visualizer.editor.EditorTopComponent;
 import org.openide.util.HelpCtx;
 import org.openide.util.actions.CallableSystemAction;
 
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/actions/ExportAction.java	Wed Feb 01 17:48:37 2012 +0100
+++ b/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/actions/ExportAction.java	Wed Feb 01 18:29:28 2012 +0100
@@ -24,7 +24,7 @@
 package com.sun.hotspot.igv.view.actions;
 
 import com.sun.hotspot.igv.settings.Settings;
-import com.sun.hotspot.igv.view.ExportCookie;
+import com.oracle.graal.visualizer.editor.ExportCookie;
 import java.awt.event.InputEvent;
 import java.awt.event.KeyEvent;
 import java.io.File;
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/actions/ExtractAction.java	Wed Feb 01 17:48:37 2012 +0100
+++ b/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/actions/ExtractAction.java	Wed Feb 01 18:29:28 2012 +0100
@@ -23,11 +23,14 @@
  */
 package com.sun.hotspot.igv.view.actions;
 
-import com.sun.hotspot.igv.view.EditorTopComponent;
+import com.oracle.graal.visualizer.editor.EditorTopComponent;
 import java.awt.Event;
 import java.awt.event.KeyEvent;
 import javax.swing.Action;
 import javax.swing.KeyStroke;
+import org.openide.awt.ActionID;
+import org.openide.awt.ActionReference;
+import org.openide.awt.ActionRegistration;
 import org.openide.util.HelpCtx;
 import org.openide.util.actions.CallableSystemAction;
 
@@ -35,6 +38,9 @@
  *
  * @author Thomas Wuerthinger
  */
+@ActionID(id = "com.sun.hotspot.igv.view.actions.ExtractAction", category = "View")
+@ActionRegistration(displayName = "Extract nodes")
+@ActionReference(path = "Menu/View", position = 300)
 public final class ExtractAction extends CallableSystemAction {
 
     @Override
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/actions/HideAction.java	Wed Feb 01 17:48:37 2012 +0100
+++ b/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/actions/HideAction.java	Wed Feb 01 18:29:28 2012 +0100
@@ -23,11 +23,14 @@
  */
 package com.sun.hotspot.igv.view.actions;
 
-import com.sun.hotspot.igv.view.EditorTopComponent;
+import com.oracle.graal.visualizer.editor.EditorTopComponent;
 import java.awt.Event;
 import java.awt.event.KeyEvent;
 import javax.swing.Action;
 import javax.swing.KeyStroke;
+import org.openide.awt.ActionID;
+import org.openide.awt.ActionReference;
+import org.openide.awt.ActionRegistration;
 import org.openide.util.HelpCtx;
 import org.openide.util.actions.CallableSystemAction;
 
@@ -35,6 +38,9 @@
  *
  * @author Thomas Wuerthinger
  */
+@ActionID(id = "com.sun.hotspot.igv.view.actions.HideAction", category = "View")
+@ActionRegistration(displayName = "Hide nodes")
+@ActionReference(path = "Menu/View", position = 400)
 public final class HideAction extends CallableSystemAction {
 
     @Override
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/actions/NextDiagramAction.java	Wed Feb 01 17:48:37 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +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 com.sun.hotspot.igv.data.ChangedListener;
-import com.sun.hotspot.igv.util.ContextAction;
-import com.sun.hotspot.igv.view.DiagramViewModel;
-import javax.swing.Action;
-import javax.swing.ImageIcon;
-import org.openide.util.*;
-
-/**
- *
- * @author Thomas Wuerthinger
- */
-public final class NextDiagramAction extends ContextAction<DiagramViewModel> implements ChangedListener<DiagramViewModel> {
-
-    private DiagramViewModel model;
-
-    public NextDiagramAction() {
-        this(Utilities.actionsGlobalContext());
-    }
-
-    public NextDiagramAction(Lookup lookup) {
-        putValue(Action.SHORT_DESCRIPTION, "Show next graph of current group");
-        putValue(Action.SMALL_ICON, new ImageIcon(ImageUtilities.loadImage("com/sun/hotspot/igv/view/images/next_diagram.png")));
-    }
-
-    @Override
-    public String getName() {
-        return NbBundle.getMessage(NextDiagramAction.class, "CTL_NextDiagramAction");
-    }
-
-    @Override
-    public HelpCtx getHelpCtx() {
-        return HelpCtx.DEFAULT_HELP;
-    }
-
-    @Override
-    public Class<DiagramViewModel> contextClass() {
-        return DiagramViewModel.class;
-    }
-
-    @Override
-    public void performAction(DiagramViewModel model) {
-        int fp = model.getFirstPosition();
-        int sp = model.getSecondPosition();
-        if (sp != model.getPositions().size() - 1) {
-            int nfp = fp + 1;
-            int nsp = sp + 1;
-            model.setPositions(nfp, nsp);
-        }
-    }
-
-    @Override
-    public void update(DiagramViewModel model) {
-        super.update(model);
-
-        if (this.model != model) {
-            if (this.model != null) {
-                this.model.getDiagramChangedEvent().removeListener(this);
-            }
-
-            this.model = model;
-            if (this.model != null) {
-                this.model.getDiagramChangedEvent().addListener(this);
-            }
-        }
-    }
-
-    @Override
-    public boolean isEnabled(DiagramViewModel model) {
-        return model.getSecondPosition() != model.getPositions().size() - 1;
-    }
-
-    @Override
-    public Action createContextAwareInstance(Lookup arg0) {
-        return new NextDiagramAction(arg0);
-    }
-
-    @Override
-    public void changed(DiagramViewModel source) {
-        update(source);
-    }
-}
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/actions/PrevDiagramAction.java	Wed Feb 01 17:48:37 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +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 com.sun.hotspot.igv.data.ChangedListener;
-import com.sun.hotspot.igv.util.ContextAction;
-import com.sun.hotspot.igv.view.DiagramViewModel;
-import javax.swing.Action;
-import javax.swing.ImageIcon;
-import org.openide.util.*;
-
-/**
- *
- * @author Thomas Wuerthinger
- */
-public final class PrevDiagramAction extends ContextAction<DiagramViewModel> implements ChangedListener<DiagramViewModel> {
-
-    private DiagramViewModel model;
-
-    public PrevDiagramAction() {
-        this(Utilities.actionsGlobalContext());
-    }
-
-    public PrevDiagramAction(Lookup lookup) {
-        putValue(Action.SHORT_DESCRIPTION, "Show previous graph of current group");
-        putValue(Action.SMALL_ICON, new ImageIcon(ImageUtilities.loadImage("com/sun/hotspot/igv/view/images/prev_diagram.png")));
-    }
-
-    @Override
-    public String getName() {
-        return NbBundle.getMessage(PrevDiagramAction.class, "CTL_PrevDiagramAction");
-    }
-
-    @Override
-    public HelpCtx getHelpCtx() {
-        return HelpCtx.DEFAULT_HELP;
-    }
-
-    @Override
-    public Class<DiagramViewModel> contextClass() {
-        return DiagramViewModel.class;
-    }
-
-    @Override
-    public void performAction(DiagramViewModel model) {
-        int fp = model.getFirstPosition();
-        int sp = model.getSecondPosition();
-        if (fp != 0) {
-            int nfp = fp - 1;
-            int nsp = sp - 1;
-            model.setPositions(nfp, nsp);
-        }
-    }
-
-    @Override
-    public void update(DiagramViewModel model) {
-        super.update(model);
-
-        if (this.model != model) {
-            if (this.model != null) {
-                this.model.getDiagramChangedEvent().removeListener(this);
-            }
-
-            this.model = model;
-            if (this.model != null) {
-                this.model.getDiagramChangedEvent().addListener(this);
-            }
-        }
-    }
-
-    @Override
-    public boolean isEnabled(DiagramViewModel model) {
-        return model.getFirstPosition() != 0;
-    }
-
-    @Override
-    public Action createContextAwareInstance(Lookup arg0) {
-        return new PrevDiagramAction(arg0);
-    }
-
-    @Override
-    public void changed(DiagramViewModel source) {
-        update(source);
-    }
-}
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/actions/ShowAllAction.java	Wed Feb 01 17:48:37 2012 +0100
+++ b/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/actions/ShowAllAction.java	Wed Feb 01 18:29:28 2012 +0100
@@ -23,11 +23,14 @@
  */
 package com.sun.hotspot.igv.view.actions;
 
-import com.sun.hotspot.igv.view.EditorTopComponent;
+import com.oracle.graal.visualizer.editor.EditorTopComponent;
 import java.awt.event.InputEvent;
 import java.awt.event.KeyEvent;
 import javax.swing.Action;
 import javax.swing.KeyStroke;
+import org.openide.awt.ActionID;
+import org.openide.awt.ActionReference;
+import org.openide.awt.ActionRegistration;
 import org.openide.util.HelpCtx;
 import org.openide.util.actions.CallableSystemAction;
 
@@ -35,6 +38,9 @@
  *
  * @author Thomas Wuerthinger
  */
+@ActionID(id = "com.sun.hotspot.igv.view.actions.ShowAllAction", category = "View")
+@ActionRegistration(displayName = "Show all nodes")
+@ActionReference(path = "Menu/View", position = 200)
 public final class ShowAllAction extends CallableSystemAction {
 
     @Override
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/actions/ZoomInAction.java	Wed Feb 01 17:48:37 2012 +0100
+++ b/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/actions/ZoomInAction.java	Wed Feb 01 18:29:28 2012 +0100
@@ -23,12 +23,15 @@
  */
 package com.sun.hotspot.igv.view.actions;
 
-import com.sun.hotspot.igv.view.EditorTopComponent;
+import com.oracle.graal.visualizer.editor.EditorTopComponent;
 import com.sun.hotspot.igv.view.scene.GraphCompilationViewer;
 import java.awt.Event;
 import java.awt.event.KeyEvent;
 import javax.swing.Action;
 import javax.swing.KeyStroke;
+import org.openide.awt.ActionID;
+import org.openide.awt.ActionReference;
+import org.openide.awt.ActionRegistration;
 import org.openide.util.HelpCtx;
 import org.openide.util.actions.CallableSystemAction;
 
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/actions/ZoomOutAction.java	Wed Feb 01 17:48:37 2012 +0100
+++ b/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/actions/ZoomOutAction.java	Wed Feb 01 18:29:28 2012 +0100
@@ -23,12 +23,15 @@
  */
 package com.sun.hotspot.igv.view.actions;
 
-import com.sun.hotspot.igv.view.EditorTopComponent;
+import com.oracle.graal.visualizer.editor.EditorTopComponent;
 import com.sun.hotspot.igv.view.scene.GraphCompilationViewer;
 import java.awt.Event;
 import java.awt.event.KeyEvent;
 import javax.swing.Action;
 import javax.swing.KeyStroke;
+import org.openide.awt.ActionID;
+import org.openide.awt.ActionReference;
+import org.openide.awt.ActionRegistration;
 import org.openide.util.HelpCtx;
 import org.openide.util.actions.CallableSystemAction;
 
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/layer.xml	Wed Feb 01 17:48:37 2012 +0100
+++ b/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/layer.xml	Wed Feb 01 18:29:28 2012 +0100
@@ -1,80 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.1//EN" "http://www.netbeans.org/dtds/filesystem-1_1.dtd">
 <filesystem>
-    <folder name="Actions">
-        <folder name="File">
-            <file name="com-sun-hotspot-igv-view-actions-ExportAction.instance">
-                <attr name="position" intvalue="1100"/>
-            </file>
-        </folder>
-        <folder name="View">
-            <file name="com-sun-hotspot-igv-view-actions-NextDiagramAction.instance"><attr name="position" intvalue="2000"/></file>
-            <file name="com-sun-hotspot-igv-view-actions-PrevDiagramAction.instance"><attr name="position" intvalue="2001"/></file>
-            <file name="com-sun-hotspot-igv-view-actions-ShowAllAction.instance"><attr name="position" intvalue="2001"/></file>
-            <file name="com-sun-hotspot-igv-view-actions-ExtractAction.instance"><attr name="position" intvalue="2001"/></file>
-            <file name="com-sun-hotspot-igv-view-actions-HideAction.instance"><attr name="position" intvalue="2001"/></file>
-            <file name="com-sun-hotspot-igv-view-actions-ZoomInAction.instance"><attr name="position" intvalue="2001"/></file>
-            <file name="com-sun-hotspot-igv-view-actions-ZoomOutAction.instance"><attr name="position" intvalue="2001"/></file>
-            <file name="com-sun-hotspot-igv-view-actions-OverviewAction.instance"><attr name="position" intvalue="2001"/></file>
-            <file name="com-sun-hotspot-igv-view-actions-PredSuccAction.instance"><attr name="position" intvalue="2001"/></file>
-            <file name="com-sun-hotspot-igv-view-actions-EnableBlockLayoutAction.instance"><attr name="position" intvalue="2001"/></file>
-        </folder>
-    </folder>
-    <folder name="Menu">
-        <folder name="View">
-            <file name="com-sun-hotspot-igv-view-actions-PrevDiagramAction.shadow">
-                <attr name="originalFile" stringvalue="Actions/View/com-sun-hotspot-igv-view-actions-PrevDiagramAction.instance"/>
-                <attr name="position" intvalue="100"/>
-            </file>
-            <file name="com-sun-hotspot-igv-view-actions-NextDiagramAction.shadow">
-                <attr name="originalFile" stringvalue="Actions/View/com-sun-hotspot-igv-view-actions-NextDiagramAction.instance"/>
-                <attr name="position" intvalue="150"/>
-            </file>
-            <file name="com-sun-hotspot-igv-view-actions-ShowAllAction.shadow">
-                <attr name="originalFile" stringvalue="Actions/View/com-sun-hotspot-igv-view-actions-ShowAllAction.instance"/>
-                <attr name="position" intvalue="200"/>
-            </file>
-            <file name="com-sun-hotspot-igv-view-actions-ExtractAction.shadow">
-                <attr name="originalFile" stringvalue="Actions/View/com-sun-hotspot-igv-view-actions-ExtractAction.instance"/>
-                <attr name="position" intvalue="300"/>
-            </file>
-            <file name="com-sun-hotspot-igv-view-actions-HideAction.shadow">
-                <attr name="originalFile" stringvalue="Actions/View/com-sun-hotspot-igv-view-actions-HideAction.instance"/>
-                <attr name="position" intvalue="400"/>
-            </file>
-            <file name="com-sun-hotspot-igv-view-actions-ZoomInAction.shadow">
-                <attr name="originalFile" stringvalue="Actions/View/com-sun-hotspot-igv-view-actions-ZoomInAction.instance"/>
-                <attr name="position" intvalue="500"/>
-            </file>
-            <file name="com-sun-hotspot-igv-view-actions-ZoomOutAction.shadow">
-                <attr name="originalFile" stringvalue="Actions/View/com-sun-hotspot-igv-view-actions-ZoomOutAction.instance"/>
-                <attr name="position" intvalue="550"/>
-            </file>
-        </folder>
-        <folder name="File">
-            <file name="ExportActionSeparator.instance">
-                <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
-                <attr name="position" intvalue="700"/>
-            </file>
-            <file name="com-sun-hotspot-igv-view-actions-ExportAction.shadow">
-                <attr name="originalFile" stringvalue="Actions/File/com-sun-hotspot-igv-view-actions-ExportAction.instance"/>
-                <attr name="position" intvalue="710"/>
-            </file>
-        </folder>
-    </folder>
-
-    <folder name="QuickSearch">
-        <folder name="Nodes">
-            <attr name="command" stringvalue="n"/>
-            <attr name="position" intvalue="0"/>
-            <file name="com-sun-hotspot-igv-view-NodeQuickSearch.instance" />
-        </folder>
-    </folder>
-    
-    <folder name="QuickSearchShadow">
-        <file name="org-netbeans-modules-quicksearch-QuickSearchAction.shadow">
-            <attr name="originalFile" stringvalue="Actions/Edit/org-netbeans-modules-quicksearch-QuickSearchAction.instance"/>
-            
-        </file>    
-    </folder>
 </filesystem>
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/scene/DiagramScene.java	Wed Feb 01 17:48:37 2012 +0100
+++ b/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/scene/DiagramScene.java	Wed Feb 01 18:29:28 2012 +0100
@@ -34,8 +34,8 @@
 import com.sun.hotspot.igv.util.ColorIcon;
 import com.sun.hotspot.igv.util.DoubleClickAction;
 import com.sun.hotspot.igv.util.PropertiesSheet;
-import com.sun.hotspot.igv.view.CompilationViewer;
-import com.sun.hotspot.igv.view.DiagramViewModel;
+import com.oracle.graal.visualizer.editor.CompilationViewer;
+import com.oracle.graal.visualizer.editor.DiagramViewModel;
 import com.sun.hotspot.igv.view.actions.CustomizablePanAction;
 import com.sun.hotspot.igv.view.widgets.*;
 import java.awt.*;
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/scene/GraphCompilationViewer.java	Wed Feb 01 17:48:37 2012 +0100
+++ b/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/scene/GraphCompilationViewer.java	Wed Feb 01 18:29:28 2012 +0100
@@ -26,9 +26,9 @@
 
 import com.sun.hotspot.igv.graph.Figure;
 import com.sun.hotspot.igv.svg.BatikSVG;
-import com.sun.hotspot.igv.view.CompilationViewer;
-import com.sun.hotspot.igv.view.DiagramViewModel;
-import com.sun.hotspot.igv.view.ExportCookie;
+import com.oracle.graal.visualizer.editor.CompilationViewer;
+import com.oracle.graal.visualizer.editor.DiagramViewModel;
+import com.oracle.graal.visualizer.editor.ExportCookie;
 import com.sun.hotspot.igv.view.actions.*;
 import java.awt.Component;
 import java.awt.Graphics2D;
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/scene/GraphCompilationViewerFactory.java	Wed Feb 01 17:48:37 2012 +0100
+++ b/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/scene/GraphCompilationViewerFactory.java	Wed Feb 01 18:29:28 2012 +0100
@@ -24,9 +24,9 @@
 
 package com.sun.hotspot.igv.view.scene;
 
-import com.sun.hotspot.igv.view.CompilationViewer;
-import com.sun.hotspot.igv.view.CompilationViewerFactory;
-import com.sun.hotspot.igv.view.DiagramViewModel;
+import com.oracle.graal.visualizer.editor.CompilationViewer;
+import com.oracle.graal.visualizer.editor.CompilationViewerFactory;
+import com.oracle.graal.visualizer.editor.DiagramViewModel;
 
 public class GraphCompilationViewerFactory implements CompilationViewerFactory{
 
--- a/src/share/tools/IdealGraphVisualizer/nbproject/project.properties	Wed Feb 01 17:48:37 2012 +0100
+++ b/src/share/tools/IdealGraphVisualizer/nbproject/project.properties	Wed Feb 01 18:29:28 2012 +0100
@@ -21,8 +21,10 @@
     ${project.com.sun.hotspot.igv.selectioncoordinator}:\
     ${project.com.sun.hotspot.igv.graal}:\
     ${project.at.ssw.visualizer.cfg}:\
-    ${project.org.eclipse.draw2d}
+    ${project.org.eclipse.draw2d}:\
+    ${project.com.oracle.graal.visualizer.editor}
 project.at.ssw.visualizer.cfg=ControlFlowEditor
+project.com.oracle.graal.visualizer.editor=Editor
 project.com.sun.hotspot.connection=NetworkConnection
 project.com.sun.hotspot.igv.bytecodes=Bytecodes
 project.com.sun.hotspot.igv.coordinator=Coordinator