changeset 4498:f721895e62e8

Added snapshots view.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Sun, 05 Feb 2012 00:46:25 +0100
parents b995eee36970
children 5ddea75b496a
files src/share/tools/IdealGraphVisualizer/Editor/src/com/oracle/graal/visualizer/editor/EditorTopComponent.java src/share/tools/IdealGraphVisualizer/Outline/manifest.mf src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/Bundle.properties src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/CompilationNode.java src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/OutlineTopComponent.form src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/OutlineTopComponent.java src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/OutlineTopComponentSettings.xml src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/OutlineTopComponentWstcref.xml src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/actions/ImportAction.java src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/actions/OutlineAction.java src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/actions/RemoveAction.java src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/actions/RemoveAllAction.java src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/actions/SaveAllAction.java src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/actions/SaveAsAction.java src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/customLeftWsmode.xml src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/images/import.png src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/images/leaf_node.gif src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/images/node.gif src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/images/remove.png src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/images/removeall.png src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/images/save.png src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/images/saveall.gif src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/layer.xml src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/server/Bundle.properties src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/server/Client.java src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/server/Server.java src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/server/ServerCallback.java src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/server/ServerPanel.java src/share/tools/IdealGraphVisualizer/OutlineView/manifest.mf src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/Bundle.properties src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/CompilationNode.java src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/OutlineTopComponent.form src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/OutlineTopComponent.java src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/OutlineTopComponentSettings.xml src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/OutlineTopComponentWstcref.xml src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/actions/ImportAction.java src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/actions/OutlineAction.java src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/actions/RemoveAction.java src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/actions/RemoveAllAction.java src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/actions/SaveAllAction.java src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/actions/SaveAsAction.java src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/customLeftWsmode.xml src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/images/import.png src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/images/leaf_node.gif src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/images/node.gif src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/images/remove.png src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/images/removeall.png src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/images/save.png src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/images/saveall.gif src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/layer.xml src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/server/Bundle.properties src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/server/Client.java src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/server/Server.java src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/server/ServerCallback.java src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/server/ServerPanel.java src/share/tools/IdealGraphVisualizer/Snapshots/src/com/oracle/graal/visualizer/snapshots/SnapshotTopComponent.java src/share/tools/IdealGraphVisualizer/Util/nbproject/project.xml src/share/tools/IdealGraphVisualizer/Util/src/com/sun/hotspot/igv/util/Bundle.properties src/share/tools/IdealGraphVisualizer/Util/src/com/sun/hotspot/igv/util/RangeSlider.java src/share/tools/IdealGraphVisualizer/nbproject/project.properties
diffstat 60 files changed, 1468 insertions(+), 1419 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/tools/IdealGraphVisualizer/Editor/src/com/oracle/graal/visualizer/editor/EditorTopComponent.java	Sat Feb 04 21:41:02 2012 +0100
+++ b/src/share/tools/IdealGraphVisualizer/Editor/src/com/oracle/graal/visualizer/editor/EditorTopComponent.java	Sun Feb 05 00:46:25 2012 +0100
@@ -132,12 +132,13 @@
 
         this.group = graph.getGroup();
         rangeSliderModel = new RangeSliderModel(calculateStringList(group));
+        content = new InstanceContent();
+        content.add(rangeSliderModel);
         int graphPos = group.getGraphs().indexOf(graph);
         rangeSliderModel.setPositions(graphPos, graphPos);
         rangeSlider = new RangeSlider(rangeSliderModel);
 
         Collection<? extends CompilationViewerFactory> factories = Lookup.getDefault().lookupAll(CompilationViewerFactory.class);
-        content = new InstanceContent();
         proxyLookup = Lookups.proxy(currentViewLookupProvider);
         this.associateLookup(new ProxyLookup(new Lookup[]{proxyLookup, new AbstractLookup(content)}));
 
--- a/src/share/tools/IdealGraphVisualizer/Outline/manifest.mf	Sat Feb 04 21:41:02 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-Manifest-Version: 1.0
-OpenIDE-Module: com.oracle.graal.visualizer.outline
-OpenIDE-Module-Layer: com/oracle/graal/visualizer/outline/layer.xml
-OpenIDE-Module-Localizing-Bundle: com/oracle/graal/visualizer/outline/Bundle.properties
-OpenIDE-Module-Specification-Version: 1.0
-
--- a/src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/Bundle.properties	Sat Feb 04 21:41:02 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-AdvancedOption_DisplayName_Coordinator=Settings
-AdvancedOption_Tooltip_Coordinator=Visualization Tool Settings
-CTL_OutlineTopComponent=Outline
-HINT_OutlineTopComponent=Displays loaded compilations.
-OpenIDE-Module-Name=Outline
--- a/src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/CompilationNode.java	Sat Feb 04 21:41:02 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,148 +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.oracle.graal.visualizer.outline;
-
-import com.sun.hotspot.igv.data.*;
-import com.sun.hotspot.igv.data.services.GraphViewer;
-import java.awt.Image;
-import java.util.ArrayList;
-import java.util.List;
-import javax.swing.Action;
-import javax.swing.JOptionPane;
-import org.openide.actions.OpenAction;
-import org.openide.cookies.OpenCookie;
-import org.openide.nodes.AbstractNode;
-import org.openide.nodes.Children;
-import org.openide.nodes.Node;
-import org.openide.util.ImageUtilities;
-import org.openide.util.Lookup;
-import org.openide.util.lookup.AbstractLookup;
-import org.openide.util.lookup.InstanceContent;
-import org.openide.util.lookup.Lookups;
-
-public class CompilationNode extends AbstractNode implements ChangedListener {
-
-    private CompilationNode(final Folder folder, Children children, InstanceContent content) {
-        super(children, new AbstractLookup(content));
-        this.setDisplayName(folder.getName());
-
-        if (folder instanceof Group) {
-            content.add(new OpenCookie() {
-
-                @Override
-                public void open() {
-                    final List<InputGraph> graphs = ((Group) folder).getGraphs();
-                    if (graphs.isEmpty()) {
-                        JOptionPane.showMessageDialog(null, "Cannot open compilation, because there was no snapshots recorded!");
-                    } else {
-                        Lookup.getDefault().lookup(GraphViewer.class).view(graphs.get(0));
-                    }
-                }
-            });
-        }
-        content.add(folder);
-        folder.getChangedEvent().addListener(this);
-    }
-
-    @Override
-    public void changed(Object folder) {
-        if (this.getChildren() == Children.LEAF) {
-            setChildren(createFolderChildren((Folder) folder));
-            this.fireIconChange();
-        }
-    }
-
-    private static class FolderChildren extends Children.Keys<Folder> {
-
-        private final Folder folder;
-
-        public FolderChildren(Folder folder) {
-            this.folder = folder;
-            folder.getChangedEvent().addListener(changedListener);
-        }
-
-        @Override
-        protected Node[] createNodes(Folder e) {
-            return new Node[]{new CompilationNode(e)};
-        }
-
-        @Override
-        public void addNotify() {
-            List<Folder> result = new ArrayList<>();
-            for (FolderElement o : folder.getElements()) {
-                if (o instanceof Folder) {
-                    result.add((Folder) o);
-                }
-            }
-            this.setKeys(result);
-        }
-        private final ChangedListener changedListener = new ChangedListener() {
-
-            @Override
-            public void changed(Object source) {
-                addNotify();
-            }
-        };
-    }
-
-    @Override
-    public Image getIcon(int i) {
-        if (this.getChildren() == Children.LEAF) {
-            return ImageUtilities.loadImage("com/oracle/graal/visualizer/outline/images/leaf_node.gif");
-        } else {
-            return ImageUtilities.loadImage("com/oracle/graal/visualizer/outline/images/node.gif");
-        }
-    }
-
-    protected CompilationNode(Folder folder) {
-        this(folder, createFolderChildren(folder), new InstanceContent());
-    }
-
-    private static Children createFolderChildren(Folder folder) {
-        for (FolderElement elem : folder.getElements()) {
-            if (elem instanceof Folder) {
-                return new FolderChildren(folder);
-            }
-        }
-        return Children.LEAF;
-    }
-
-    @Override
-    public Action[] getActions(boolean context) {
-        List<Action> actions = new ArrayList<>();
-        actions.add((Action) OpenAction.findObject(OpenAction.class, true));
-        actions.addAll(Lookups.forPath(OutlineTopComponent.NODE_ACTIONS_FOLDER).lookupAll(Action.class));
-        return actions.toArray(new Action[actions.size()]);
-    }
-
-    @Override
-    public Action getPreferredAction() {
-        return (Action) OpenAction.findObject(OpenAction.class, true);
-    }
-
-    @Override
-    public Image getOpenedIcon(int i) {
-        return getIcon(i);
-    }
-}
--- a/src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/OutlineTopComponent.form	Sat Feb 04 21:41:02 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<Form version="1.2" maxVersion="1.2" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
-  <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"/>
-  <SubComponents>
-    <Container class="javax.swing.JScrollPane" name="treeView">
-      <AuxValues>
-        <AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new BeanTreeView();"/>
-      </AuxValues>
-      <Constraints>
-        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
-          <BorderConstraints direction="Center"/>
-        </Constraint>
-      </Constraints>
-
-      <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
-    </Container>
-  </SubComponents>
-</Form>
--- a/src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/OutlineTopComponent.java	Sat Feb 04 21:41:02 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,228 +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.oracle.graal.visualizer.outline;
-
-import com.oracle.graal.visualizer.outline.server.Server;
-import com.oracle.graal.visualizer.outline.server.ServerPanel;
-import com.sun.hotspot.igv.data.GraphDocument;
-import java.awt.BorderLayout;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-import javax.swing.Action;
-import javax.swing.UIManager;
-import javax.swing.border.Border;
-import org.openide.ErrorManager;
-import org.openide.actions.GarbageCollectAction;
-import org.openide.awt.Toolbar;
-import org.openide.explorer.ExplorerManager;
-import org.openide.explorer.ExplorerUtils;
-import org.openide.explorer.view.BeanTreeView;
-import org.openide.util.ContextAwareAction;
-import org.openide.util.LookupEvent;
-import org.openide.util.LookupListener;
-import org.openide.util.NbBundle;
-import org.openide.util.lookup.Lookups;
-import org.openide.windows.TopComponent;
-import org.openide.windows.WindowManager;
-
-public final class OutlineTopComponent extends TopComponent implements ExplorerManager.Provider, LookupListener {
-
-    public static final String GLOBAL_ACTIONS_FOLDER = "Actions/Outline/Global";
-    public static final String NODE_ACTIONS_FOLDER = "Actions/Outline/Nodes";
-    public static OutlineTopComponent instance;
-    public static final String PREFERRED_ID = "OutlineTopComponent";
-    private ExplorerManager manager;
-    private GraphDocument document;
-    private Server server;
-
-    private OutlineTopComponent() {
-        initComponents();
-
-        setName(NbBundle.getMessage(OutlineTopComponent.class, "CTL_OutlineTopComponent"));
-        setToolTipText(NbBundle.getMessage(OutlineTopComponent.class, "HINT_OutlineTopComponent"));
-
-        document = new GraphDocument();
-        initListView();
-        initToolbar();
-    }
-
-    private void initListView() {
-        manager = new ExplorerManager();
-        manager.setRootContext(new CompilationNode(document));
-        ((BeanTreeView) this.treeView).setRootVisible(false);
-        associateLookup(ExplorerUtils.createLookup(manager, getActionMap()));
-    }
-
-    private void initToolbar() {
-
-        Toolbar toolbar = new Toolbar();
-        Border b = (Border) UIManager.get("Nb.Editor.Toolbar.border"); //NOI18N
-        toolbar.setBorder(b);
-        this.add(toolbar, BorderLayout.NORTH);
-        for (Action a : lookupActions(GLOBAL_ACTIONS_FOLDER)) {
-            toolbar.add(a);
-        }
-        toolbar.add(GarbageCollectAction.get(GarbageCollectAction.class).getToolbarPresenter());
-        toolbar.add(new ServerPanel(getDocument()));
-    }
-    
-    private List<Action> lookupActions(String path) {
-        List<Action> actions = new ArrayList<>();
-        for (Action a : Lookups.forPath(path).lookupAll(Action.class)) {
-            Action newAction = a;
-            if (a instanceof ContextAwareAction) {
-                newAction = ((ContextAwareAction) a).createContextAwareInstance(getLookup());
-            }
-            newAction.putValue(Action.SHORT_DESCRIPTION, newAction.getValue(Action.NAME));
-            actions.add(newAction);
-            
-        }
-        return actions;
-    }
-
-    public void clear() {
-        document.clear();
-    }
-
-    @Override
-    public ExplorerManager getExplorerManager() {
-        return manager;
-    }
-
-    public GraphDocument getDocument() {
-        return document;
-    }
-
-    /**
-     * Gets default instance. Do not use directly: reserved for *.settings files
-     * only, i.e. deserialization routines; otherwise you could get a
-     * non-deserialized instance. To obtain the singleton instance, use {@link findInstance}.
-     */
-    public static synchronized OutlineTopComponent getDefault() {
-        if (instance == null) {
-            instance = new OutlineTopComponent();
-        }
-        return instance;
-    }
-
-    /**
-     * Obtain the OutlineTopComponent instance. Never call {@link #getDefault}
-     * directly!
-     */
-    public static synchronized OutlineTopComponent findInstance() {
-        TopComponent win = WindowManager.getDefault().findTopComponent(PREFERRED_ID);
-        if (win == null) {
-            ErrorManager.getDefault().log(ErrorManager.WARNING, "Cannot find Outline component. It will not be located properly in the window system.");
-            return getDefault();
-        }
-        if (win instanceof OutlineTopComponent) {
-            return (OutlineTopComponent) win;
-        }
-        ErrorManager.getDefault().log(ErrorManager.WARNING, "There seem to be multiple components with the '" + PREFERRED_ID + "' ID. That is a potential source of errors and unexpected behavior.");
-        return getDefault();
-    }
-
-    @Override
-    public int getPersistenceType() {
-        return TopComponent.PERSISTENCE_ALWAYS;
-    }
-
-    @Override
-    public void componentOpened() {
-        this.requestActive();
-    }
-
-    @Override
-    public void componentClosed() {
-    }
-
-    @Override
-    protected String preferredID() {
-        return PREFERRED_ID;
-    }
-
-    @Override
-    public void requestActive() {
-        super.requestActive();
-        treeView.requestFocus();
-    }
-
-    @Override
-    public boolean requestFocus(boolean temporary) {
-        treeView.requestFocus();
-        return super.requestFocus(temporary);
-    }
-
-    @Override
-    protected boolean requestFocusInWindow(boolean temporary) {
-        treeView.requestFocus();
-        return super.requestFocusInWindow(temporary);
-    }
-
-    @Override
-    public void resultChanged(LookupEvent lookupEvent) {
-    }
-
-    @Override
-    public void readExternal(ObjectInput objectInput) throws IOException, ClassNotFoundException {
-        // Not called when user starts application for the first time
-        super.readExternal(objectInput);
-        ((BeanTreeView) this.treeView).setRootVisible(false);
-    }
-
-    @Override
-    public void writeExternal(ObjectOutput objectOutput) throws IOException {
-        super.writeExternal(objectOutput);
-    }
-
-    static final class ResolvableHelper implements Serializable {
-
-        private static final long serialVersionUID = 1L;
-
-        public Object readResolve() {
-            return OutlineTopComponent.getDefault();
-        }
-    }
-
-    /**
-     * 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() {
-
-        treeView = new BeanTreeView();
-
-        setLayout(new java.awt.BorderLayout());
-        add(treeView, java.awt.BorderLayout.CENTER);
-    }// </editor-fold>//GEN-END:initComponents
-    // Variables declaration - do not modify//GEN-BEGIN:variables
-    private javax.swing.JScrollPane treeView;
-    // End of variables declaration//GEN-END:variables
-}
--- a/src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/OutlineTopComponentSettings.xml	Sat Feb 04 21:41:02 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE settings PUBLIC "-//NetBeans//DTD Session settings 1.0//EN" "http://www.netbeans.org/dtds/sessionsettings-1_0.dtd">
-<settings version="1.0">
-    <module name="com.oracle.graal.visualizer.outline" spec="1.0"/>
-    <instanceof class="at.openide.windows.TopComponent"/>
-    <instanceof class="com.oracle.graal.visualizer.outline.OutlineTopComponent"/>
-    <instance class="com.oracle.graal.visualizer.outline.OutlineTopComponent" method="getDefault"/>
-</settings>
--- a/src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/OutlineTopComponentWstcref.xml	Sat Feb 04 21:41:02 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE tc-ref PUBLIC "-//NetBeans//DTD Top Component in Mode Properties 2.0//EN" "http://www.netbeans.org/dtds/tc-ref2_0.dtd">
-<tc-ref version="2.0" >
-    <module name="com.oracle.graal.visualizer.outline" spec="1.0"/>
-    <tc-id id="OutlineTopComponent"/>
-    <state opened="true"/>
-</tc-ref>
--- a/src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/actions/ImportAction.java	Sat Feb 04 21:41:02 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,155 +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.oracle.graal.visualizer.outline.actions;
-
-import com.oracle.graal.visualizer.outline.OutlineTopComponent;
-import com.sun.hotspot.igv.data.GraphDocument;
-import com.sun.hotspot.igv.data.serialization.Parser;
-import com.sun.hotspot.igv.data.serialization.XMLParser;
-import com.sun.hotspot.igv.settings.Settings;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import javax.swing.JFileChooser;
-import javax.swing.SwingUtilities;
-import javax.swing.filechooser.FileFilter;
-import org.netbeans.api.progress.ProgressHandle;
-import org.netbeans.api.progress.ProgressHandleFactory;
-import org.openide.DialogDisplayer;
-import org.openide.NotifyDescriptor;
-import org.openide.awt.ActionID;
-import org.openide.awt.ActionReference;
-import org.openide.awt.ActionReferences;
-import org.openide.awt.ActionRegistration;
-import org.openide.util.RequestProcessor;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-@ActionID(id = "com.oracle.graal.visualizer.outline.actions.ImportAction", category = "File")
-@ActionRegistration(displayName = "Import", iconBase="com/oracle/graal/visualizer/outline/images/import.png")
-@ActionReferences(value = {
-    @ActionReference(path = "Menu/File", position = 100),
-    @ActionReference(path = OutlineTopComponent.GLOBAL_ACTIONS_FOLDER)})
-public final class ImportAction implements ActionListener {
-
-    public static FileFilter getFileFilter() {
-        return new FileFilter() {
-
-            @Override
-            public boolean accept(File f) {
-                return f.getName().toLowerCase().endsWith(".xml") || f.isDirectory();
-            }
-
-            @Override
-            public String getDescription() {
-                return "XML files (*.xml)";
-            }
-        };
-    }
-
-    @Override
-    public void actionPerformed(ActionEvent e) {
-
-        JFileChooser fc = new JFileChooser();
-        fc.setFileFilter(ImportAction.getFileFilter());
-        fc.setCurrentDirectory(new File(Settings.get().get(Settings.DIRECTORY, Settings.DIRECTORY_DEFAULT)));
-
-        if (fc.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
-            File file = fc.getSelectedFile();
-
-            File dir = file;
-            if (!dir.isDirectory()) {
-                dir = dir.getParentFile();
-            }
-
-            Settings.get().put(Settings.DIRECTORY, dir.getAbsolutePath());
-
-            try {
-                final FileInputStream inputStream = new FileInputStream(file);
-                final InputSource is = new InputSource(inputStream);
-
-                final ProgressHandle handle = ProgressHandleFactory.createHandle("Opening file " + file.getName());
-                final int basis = 1000;
-                handle.start(basis);
-                final int start = inputStream.available();
-
-                final XMLParser.ParseMonitor parseMonitor = new XMLParser.ParseMonitor() {
-
-                    @Override
-                    public void setProgress(double d) {
-                        try {
-                            int curAvailable = inputStream.available();
-                            int prog = (int) (basis * (double) (start - curAvailable) / (double) start);
-                            handle.progress(prog);
-                        } catch (IOException ex) {
-                        }
-                    }
-
-                    @Override
-                    public void setState(String state) {
-                        setProgress(0.0);
-                        handle.progress(state);
-                    }
-                };
-                final Parser parser = new Parser();
-                final OutlineTopComponent component = OutlineTopComponent.findInstance();
-
-                component.requestActive();
-
-                RequestProcessor.getDefault().post(new Runnable() {
-
-                    @Override
-                    public void run() {
-                        try {
-                            final GraphDocument document = parser.parse(is, parseMonitor);
-                            parseMonitor.setState("Finishing");
-                            SwingUtilities.invokeLater(new Runnable(){
-
-                                @Override
-                                public void run() {
-                                    component.getDocument().addGraphDocument(document);
-                                }
-                            });
-                        } catch (SAXException ex) {
-                            String s = "Exception during parsing the XML file, could not load document!";
-                            if (ex instanceof XMLParser.MissingAttributeException) {
-                                XMLParser.MissingAttributeException e = (XMLParser.MissingAttributeException) ex;
-                                s += "\nMissing attribute \"" + e.getAttributeName() + "\"";
-                            }
-                            NotifyDescriptor d = new NotifyDescriptor.Message(s, NotifyDescriptor.ERROR_MESSAGE);
-                            DialogDisplayer.getDefault().notify(d);
-                        }
-                        handle.finish();
-                    }
-                });
-
-            } catch (IOException ex) {
-                DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message("Error reading file!", NotifyDescriptor.ERROR_MESSAGE));
-            }
-        }
-    }
-}
--- a/src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/actions/OutlineAction.java	Sat Feb 04 21:41:02 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +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.oracle.graal.visualizer.outline.actions;
-
-import com.oracle.graal.visualizer.outline.OutlineTopComponent;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import org.openide.awt.ActionID;
-import org.openide.awt.ActionReference;
-import org.openide.awt.ActionRegistration;
-import org.openide.windows.TopComponent;
-
-@ActionID(id = "com.oracle.graal.visualizer.outline.actions.OutlineAction", category = "Window")
-@ActionRegistration(displayName = "Compilations")
-@ActionReference(path = "Menu/Window", name = "OutlineAction")
-public class OutlineAction implements ActionListener {
-    @Override
-    public void actionPerformed(ActionEvent evt) {
-        TopComponent win = OutlineTopComponent.findInstance();
-        win.open();
-        win.requestActive();
-    }
-}
--- a/src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/actions/RemoveAction.java	Sat Feb 04 21:41:02 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +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.oracle.graal.visualizer.outline.actions;
-
-import com.oracle.graal.visualizer.outline.OutlineTopComponent;
-import com.sun.hotspot.igv.data.FolderElement;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.util.List;
-import org.openide.awt.ActionID;
-import org.openide.awt.ActionReference;
-import org.openide.awt.ActionReferences;
-import org.openide.awt.ActionRegistration;
-
-@ActionID(id = "com.oracle.graal.visualizer.outline.actions.RemoveAction", category = "Edit")
-@ActionRegistration(displayName = "Remove", iconBase = "com/oracle/graal/visualizer/outline/images/remove.png")
-@ActionReferences(value = {
-    @ActionReference(path = "Menu/File", position = 400),
-    @ActionReference(path = OutlineTopComponent.NODE_ACTIONS_FOLDER)})
-public final class RemoveAction implements ActionListener {
-
-    List<FolderElement> elements;
-
-    public RemoveAction(List<FolderElement> elements) {
-        this.elements = elements;
-    }
-
-    @Override
-    public void actionPerformed(ActionEvent e) {
-        for (FolderElement element : elements) {
-            element.getParent().removeElement(element);
-        }
-    }
-}
--- a/src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/actions/RemoveAllAction.java	Sat Feb 04 21:41:02 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +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.  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.outline.actions;
-
-import com.oracle.graal.visualizer.outline.OutlineTopComponent;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import org.openide.awt.ActionID;
-import org.openide.awt.ActionReference;
-import org.openide.awt.ActionReferences;
-import org.openide.awt.ActionRegistration;
-
-@ActionID(id = "com.oracle.graal.visualizer.outline.actions.RemoveAllAction", category = "Edit")
-@ActionRegistration(displayName = "Remove all", iconBase = "com/oracle/graal/visualizer/outline/images/removeall.png")
-@ActionReferences(value = {
-    @ActionReference(path = "Menu/File", position = 500),
-    @ActionReference(path = OutlineTopComponent.GLOBAL_ACTIONS_FOLDER)})
-public final class RemoveAllAction implements ActionListener {
-
-    @Override
-    public void actionPerformed(ActionEvent e) {
-        OutlineTopComponent.findInstance().clear();
-    }
-}
--- a/src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/actions/SaveAllAction.java	Sat Feb 04 21:41:02 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +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.  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.outline.actions;
-
-import com.oracle.graal.visualizer.outline.OutlineTopComponent;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import org.openide.awt.ActionID;
-import org.openide.awt.ActionReference;
-import org.openide.awt.ActionReferences;
-import org.openide.awt.ActionRegistration;
-
-@ActionID(id = "com.oracle.graal.visualizer.outline.actions.SaveAllAction", category = "File")
-@ActionRegistration(displayName = "Save all..", iconBase = "com/oracle/graal/visualizer/outline/images/saveall.gif")
-@ActionReferences(value = {
-    @ActionReference(path = "Menu/File", position = 300),
-    @ActionReference(path = OutlineTopComponent.GLOBAL_ACTIONS_FOLDER)})
-public final class SaveAllAction implements ActionListener {
-
-    @Override
-    public void actionPerformed(ActionEvent e) {
-        final OutlineTopComponent component = OutlineTopComponent.findInstance();
-        SaveAsAction.save(component.getDocument());
-    }
-}
--- a/src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/actions/SaveAsAction.java	Sat Feb 04 21:41:02 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,105 +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.oracle.graal.visualizer.outline.actions;
-
-import com.oracle.graal.visualizer.outline.OutlineTopComponent;
-import com.sun.hotspot.igv.data.Folder;
-import com.sun.hotspot.igv.data.FolderElement;
-import com.sun.hotspot.igv.data.GraphDocument;
-import com.sun.hotspot.igv.data.serialization.Printer;
-import com.sun.hotspot.igv.settings.Settings;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.io.*;
-import java.util.List;
-import javax.swing.JFileChooser;
-import javax.swing.JOptionPane;
-import org.openide.awt.ActionID;
-import org.openide.awt.ActionReference;
-import org.openide.awt.ActionReferences;
-import org.openide.awt.ActionRegistration;
-
-@ActionID(id = "com.oracle.graal.visualizer.outline.actions.SaveAsAction", category = "File")
-@ActionRegistration(displayName = "Save as...", iconBase="com/oracle/graal/visualizer/outline/images/save.png")
-@ActionReferences(value = {
-    @ActionReference(path = "Menu/File", position = 200),
-    @ActionReference(path = OutlineTopComponent.NODE_ACTIONS_FOLDER)})
-public final class SaveAsAction implements ActionListener {
-
-    private final List<FolderElement> elements;
-    
-    public SaveAsAction(List<FolderElement> elements) {
-        this.elements = elements;
-    }
-
-
-    @Override
-    public void actionPerformed(ActionEvent e) {
-        GraphDocument doc = new GraphDocument();
-        outer: for (FolderElement element : elements) {
-            Folder cur = element.getParent();
-            while (cur instanceof FolderElement) {
-                FolderElement curElement = (FolderElement) cur;
-                if (elements.contains(curElement)) {
-                    continue outer;
-                }
-                cur = curElement.getParent();
-            }
-            
-            Folder previousParent = element.getParent();
-            doc.addElement(element);
-            element.setParent(previousParent);
-        }
-
-        save(doc);
-    }
-
-    public static void save(GraphDocument doc) {
-        JFileChooser fc = new JFileChooser();
-        fc.setFileFilter(ImportAction.getFileFilter());
-        fc.setCurrentDirectory(new File(Settings.get().get(Settings.DIRECTORY, Settings.DIRECTORY_DEFAULT)));
-
-        if (fc.showSaveDialog(null) == JFileChooser.APPROVE_OPTION) {
-            File file = fc.getSelectedFile();
-            if (!file.getName().contains(".")) {
-                file = new File(file.getAbsolutePath() + ".xml");
-            }
-
-            File dir = file;
-            if (!dir.isDirectory()) {
-                dir = dir.getParentFile();
-            }
-            Settings.get().put(Settings.DIRECTORY, dir.getAbsolutePath());
-            try {
-                try (Writer writer = new OutputStreamWriter(new FileOutputStream(file))) {
-                    Printer p = new Printer();
-                    p.export(writer, doc);
-                }
-            } catch (IOException e) {
-                JOptionPane.showMessageDialog(null, "Error writing file " + file.getAbsolutePath());
-            }
-        }
-    }
-}
--- a/src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/customLeftWsmode.xml	Sat Feb 04 21:41:02 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<mode version="2.1">
-    <name unique="customLeft" />
-    <kind type="view" />
-    <state type="joined" />
-    <constraints>
-        <path orientation="horizontal" number="0" weight="0.2"/>
-        <path orientation="vertical" number="0" weight="0.75"/>
-    </constraints>
-    <bounds x="0" y="0" width="0" height="0" />
-    <frame state="0"/>
-    <active-tc id="OutlineTopComponent"/>
-    <empty-behavior permanent="false"/>
-</mode>
Binary file src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/images/import.png has changed
Binary file src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/images/leaf_node.gif has changed
Binary file src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/images/node.gif has changed
Binary file src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/images/remove.png has changed
Binary file src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/images/removeall.png has changed
Binary file src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/images/save.png has changed
Binary file src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/images/saveall.gif has changed
--- a/src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/layer.xml	Sat Feb 04 21:41:02 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,174 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.2//EN" "http://www.netbeans.org/dtds/filesystem-1_2.dtd">
-<filesystem>
-    <folder name="Actions"/>
-    
-    <folder name="Menu">
-        <folder name="File">
-            <file name="Separator2.instance_hidden"/>
-            <file name="Separator3.instance_hidden"/>
-            <file name="SeparatorOpen.instance_hidden"/>
-            <file name="SeparatorSave.instance">
-                <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
-                <attr name="position" intvalue="150"/>
-            </file>
-            <file name="SeparatorRemove.instance">
-                <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
-                <attr name="position" intvalue="350"/>
-            </file>
-            
-            <!-- Hidden menu entries from other modules -->
-            <file name="org-netbeans-modules-editor-ExportHtmlAction.shadow_hidden"/>
-            <file name="org-netbeans-modules-openfile-OpenFileAction.shadow_hidden"/>
-            <file name="org-netbeans-modules-openfile-RecentFileAction.shadow_hidden"/>
-            <file name="org-netbeans-modules-print-action-PageSetupAction.shadow_hidden"/>
-            <file name="org-netbeans-modules-print-action-PrintAction.shadow_hidden"/>
-            <file name="org-netbeans-modules-project-ui-CloseProject.shadow_hidden"/>
-            <file name="org-netbeans-modules-project-ui-CustomizeProject.shadow_hidden"/>
-            <file name="org-netbeans-modules-project-ui-NewFile.shadow_hidden"/>
-            <file name="org-netbeans-modules-project-ui-NewProject.shadow_hidden"/>
-            <file name="org-netbeans-modules-project-ui-OpenProject.shadow_hidden"/>
-            <file name="org-netbeans-modules-project-ui-RecentProjects.shadow_hidden"/>
-            <file name="org-netbeans-modules-project-ui-groups-GroupsMenu.shadow_hidden"/>
-            <file name="org-openide-actions-SaveAction.shadow_hidden"/>
-            <file name="org-openide-actions-SaveAllAction.shadow_hidden"/>
-            <file name="org-openide-actions-SaveAsAction.shadow_hidden"/>
-        </folder>
-        
-        <folder name="Edit">
-            <!-- Hidden menu entries from other modules -->
-            <file name="Separator1.instance_hidden"/>
-            <file name="Separator2.instance_hidden"/>
-            <file name="SeparatorAfterFindPrevious.instance_hidden"/>
-            <file name="SeparatorAfterProjectsSearch.instance_hidden"/>
-            <file name="WhereUsedAction.shadow_hidden"/>
-            <file name="org-netbeans-modules-editor-MainMenuAction$FindNextAction.instance_hidden"/>
-            <file name="org-netbeans-modules-editor-MainMenuAction$FindPreviousAction.instance_hidden"/>
-            <file name="org-netbeans-modules-editor-MainMenuAction$FindSelectionAction.instance_hidden"/>
-            <file name="org-netbeans-modules-editor-MainMenuAction$PasteFormattedAction.instance_hidden"/>
-            <file name="org-netbeans-modules-editor-MainMenuAction$SelectAllAction.instance_hidden"/>
-            <file name="org-netbeans-modules-editor-MainMenuAction$SelectIdentifierAction.instance_hidden"/>
-            <file name="org-netbeans-modules-editor-MainMenuAction$StartMacroRecordingAction.instance_hidden"/>
-            <file name="org-netbeans-modules-editor-MainMenuAction$StopMacroRecordingAction.instance_hidden"/>
-            <file name="org-netbeans-modules-search-FindInFilesAction.shadow_hidden"/>
-            <file name="org-netbeans-modules-search-ReplaceInFilesAction.shadow_hidden"/>
-            <file name="org-openide-actions-CopyAction.shadow_hidden"/>
-            <file name="org-openide-actions-CutAction.shadow_hidden"/>
-            <file name="org-openide-actions-DeleteAction.shadow_hidden"/>
-            <file name="org-openide-actions-FindAction.shadow_hidden"/>
-            <file name="org-openide-actions-PasteAction.shadow_hidden"/>
-            <file name="org-openide-actions-ReplaceAction.shadow_hidden"/>
-            <file name="sep-before-reposearch.instance_hidden"/>
-        </folder>
-        
-        <folder name="View">
-            <!-- Hidden menu entries from other modules -->
-            <file name="Separator1.instance_hidden"/>
-            <file name="Separator2.instance_hidden"/>
-            <file name="org-netbeans-core-actions-HTMLViewAction.shadow_hidden"/>
-            <file name="org-netbeans-core-actions-LogAction.shadow_hidden"/>
-            <file name="org-netbeans-core-multiview-EditorsAction.instance_hidden"/>
-            <file name="org-netbeans-core-windows-actions-ToolbarsListAction.instance_hidden"/>
-            <file name="org-netbeans-modules-editor-NbCodeFoldingAction.instance_hidden"/>
-            <file name="org-netbeans-modules-project-ui-SyncEditorWithViewsAction.shadow_hidden"/>
-            <file name="org-netbeans-modules-versioning-ShowTextAnnotationsAction.shadow_hidden"/>
-            <file name="org-netbeans-modules-versioning-diff-ShowDiffSidebarAction.shadow_hidden"/>
-            <file name="toggle-line-numbers.shadow_hidden"/>
-            <file name="toggle-non-printable-characters.shadow_hidden"/>
-            <file name="toggle-toolbar.shadow_hidden"/>
-        </folder>
-        
-        <!-- Hidden menus -->
-        <folder name="GoTo_hidden"/>
-        <folder name="Source_hidden"/>
-        <folder name="Refactoring_hidden"/>
-        <folder name="BuildProject_hidden"/>
-        <folder name="RunProject_hidden"/>
-        <folder name="Versioning_hidden"/>
-        
-        <folder name="Tools">
-            <!-- Hidden menu entries from other modules -->
-            <file name="LibrariesCustomizerAction.shadow_hidden"/>
-            <file name="PaletteManager_hidden"/>
-            <file name="Separator1.instance_hidden"/>
-            <file name="Separator2.instance_hidden"/>
-            <file name="ServerManagerAction3.shadow_hidden"/>
-            <file name="VariablesCustomizerAction.shadow_hidden"/>
-            <file name="org-netbeans-modules-autoupdate-ui-actions-PluginManagerAction.shadow_hidden"/>
-            <file name="org-netbeans-modules-favorites-templates-TemplatesAction.shadow_hidden"/>
-            <file name="org-netbeans-modules-options-OptionsWindowAction-separatorBefore.instance_hidden"/>
-            <file name="org-netbeans-modules-xml-catalog-CatalogAction.shadow_hidden"/>
-            <file name="org-openide-actions-ToolsAction.shadow_hidden"/>
-        </folder>
-        
-        <folder name="Window">
-            
-            <!-- Hidden menu entries from other modules -->
-            <file name="Debug_hidden"/>
-            <file name="Navigator_hidden"/>
-            <file name="Other_hidden"/>
-            <file name="Output_hidden"/>
-            <file name="ProgressListAction.shadow_hidden"/>
-            <file name="ShowPaletteAction.shadow_hidden"/>
-            <file name="SwitchToRecentDocumentAction.shadow_hidden"/>
-            <file name="Versioning_hidden"/>
-            <file name="org-netbeans-core-ide-ServicesTabAction.shadow_hidden"/>
-            <file name="org-netbeans-modules-favorites-View.shadow_hidden"/>
-            <file name="org-netbeans-modules-project-ui-logical-tab-action.shadow_hidden"/>
-            <file name="org-netbeans-modules-project-ui-physical-tab-action.shadow_hidden"/>
-            <file name="org-netbeans-modules-tasklist-ui-TaskListAction.shadow_hidden"/>
-            <file name="CloneDocumentAction.shadow_hidden"/>
-        </folder>
-
-        <folder name="Help">
-            <!-- Hidden menu entries from other modules -->
-            <file name="Separator1.instance_hidden"/>
-            <file name="netbeans-kb.url_hidden"/>
-            <file name="org-netbeans-modules-autoupdate-ui-actions-CheckForUpdatesAction.shadow_hidden"/>
-            <file name="org-netbeans-modules-bugzilla-ReportNBIssueAction.shadow_hidden"/>
-            <file name="org-netbeans-modules-usersguide-master.xml_hidden"/>
-            <file name="shortcuts.xml_hidden"/>
-        </folder>
-    </folder>
-
-    <folder name="OptionsDialog">
-        <!-- Hidden option tabs from other modules -->
-        <file name="Editor.instance_hidden"/>
-        <file name="FontsAndColors.instance_hidden"/>
-        <file name="General.instance_hidden"/>
-        <file name="Keymaps.instance_hidden"/>
-        <folder name="Advanced">
-            <file name="Files.instance_hidden"/>
-            <file name="IssueTracking.instance_hidden"/>
-            <file name="JavaScript.instance_hidden"/>
-            <file name="Spellchecker.instance_hidden"/>
-            <file name="TermAdvancedOption.instance_hidden"/>
-            <file name="ToDo.instance_hidden"/>
-            <file name="Versioning.instance_hidden"/>
-        </folder>
-    </folder>
-    
-    <folder name="Toolbars">
-        <file name="Build_hidden"/>
-        <file name="Clipboard_hidden"/>
-        <file name="Debug_hidden"/>
-        <file name="Debugging.xml_hidden"/>
-        <file name="File_hidden"/>
-        <file name="Memory_hidden"/>
-        <file name="Standard.xml_hidden"/>
-        <file name="UndoRedo_hidden"/>
-    </folder>
-    <folder name="Windows2">
-        <folder name="Components">
-            <file name="OutlineTopComponent.settings" url="OutlineTopComponentSettings.xml"/>
-        </folder>
-        <folder name="Modes">  
-            <file name="customLeft.wsmode" url="customLeftWsmode.xml"/>
-            <folder name="customLeft">
-                <file name="OutlineTopComponent.wstcref" url="OutlineTopComponentWstcref.xml"/>
-            </folder>
-        </folder>
-    </folder>
-    
-    
-</filesystem>
--- a/src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/server/Bundle.properties	Sat Feb 04 21:41:02 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-OpenIDE-Module-Name=NetworkConnection
--- a/src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/server/Client.java	Sat Feb 04 21:41:02 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +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.  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.outline.server;
-
-import com.sun.hotspot.igv.data.serialization.Parser;
-import java.io.BufferedInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.Socket;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-public class Client implements Runnable {
-
-    private Socket socket;
-    private ServerCallback callback;
-
-    public Client(Socket socket, ServerCallback callback) {
-        this.callback = callback;
-        this.socket = socket;
-    }
-
-    @Override
-    public void run() {
-        callback.connectionOpened(socket.getInetAddress());
-        try {
-            InputStream inputStream = new BufferedInputStream(socket.getInputStream());
-            InputSource is = new InputSource(inputStream);
-
-            try {
-                Parser parser = new Parser(callback);
-                parser.parse(is, null);
-            } catch (SAXException ex) {
-                throw new IOException(ex);
-            }
-        } catch (IOException ex) {
-        } finally {
-            try {
-                socket.close();
-            } catch (IOException ex) {
-            }
-            callback.connectionClosed();
-        }
-    }
-}
\ No newline at end of file
--- a/src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/server/Server.java	Sat Feb 04 21:41:02 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +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.  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.outline.server;
-
-import java.io.IOException;
-import java.net.ServerSocket;
-import java.net.Socket;
-import org.openide.DialogDisplayer;
-import org.openide.NotifyDescriptor;
-import org.openide.util.RequestProcessor;
-
-public class Server {
-
-    private Runnable serverRunnable;
-    private ServerSocket serverSocket;
-    
-    private Server() {}
-    
-
-    public static Server start(final ServerCallback callback, int port) {
-
-        final Server server = new Server();
-        
-        try {
-            server.serverSocket = new java.net.ServerSocket(port);
-        } catch (IOException ex) {
-            NotifyDescriptor message = new NotifyDescriptor.Message("Could not create server. Listening for incoming data is disabled.", NotifyDescriptor.ERROR_MESSAGE);
-            DialogDisplayer.getDefault().notifyLater(message);
-            return null;
-        }
-
-        Runnable runnable = new Runnable() {
-
-            @Override
-            public void run() {
-                while (true) {
-                    try {
-                        Socket clientSocket = server.serverSocket.accept();
-                        if (server.serverRunnable != this) {
-                            clientSocket.close();
-                            return;
-                        }
-                        RequestProcessor.getDefault().post(new Client(clientSocket, callback), 0, Thread.MAX_PRIORITY);
-                    } catch (IOException ex) {
-                        server.serverSocket = null;
-                        NotifyDescriptor message = new NotifyDescriptor.Message("Error during listening for incoming connections. Listening for incoming data is disabled.", NotifyDescriptor.ERROR_MESSAGE);
-                        DialogDisplayer.getDefault().notifyLater(message);
-                        return;
-                    }
-                }
-            }
-        };
-
-        server.serverRunnable = runnable;
-        RequestProcessor.getDefault().post(runnable, 0, Thread.MAX_PRIORITY);
-        return server;
-    }
-
-    void shutdown() {
-        try {
-            serverSocket.close();
-        } catch (IOException ex) {
-        }
-        
-        serverSocket = null;
-    }
-}
--- a/src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/server/ServerCallback.java	Sat Feb 04 21:41:02 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +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.  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.outline.server;
-
-import com.sun.hotspot.igv.data.services.GroupCallback;
-import java.net.InetAddress;
-
-public interface ServerCallback extends GroupCallback {
-    
-    public void connectionOpened(InetAddress inetAddress);
-
-    public void connectionClosed();
-
-}
--- a/src/share/tools/IdealGraphVisualizer/Outline/src/com/oracle/graal/visualizer/outline/server/ServerPanel.java	Sat Feb 04 21:41:02 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +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.  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.outline.server;
-
-import com.sun.hotspot.igv.data.GraphDocument;
-import com.sun.hotspot.igv.data.Group;
-import com.sun.hotspot.igv.settings.Settings;
-import java.awt.BorderLayout;
-import java.awt.Component;
-import java.awt.Font;
-import java.net.InetAddress;
-import java.util.prefs.PreferenceChangeEvent;
-import java.util.prefs.PreferenceChangeListener;
-import javax.swing.BorderFactory;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.SwingUtilities;
-
-public class ServerPanel extends JPanel {
-
-    private final static int BORDER_SIZE = 2;
-    JLabel label;
-    private Server server;
-    private int port = -1;
-    private int numberOfConnections;
-    private final GraphDocument document;
-    private final PreferenceChangeListener preferenceChanged = new PreferenceChangeListener() {
-
-        @Override
-        public void preferenceChange(PreferenceChangeEvent evt) {
-            updateServer();
-        }
-    };
-    private ServerCallback callback = new ServerCallback() {
-
-        @Override
-        public void connectionOpened(InetAddress inetAddress) {
-            SwingUtilities.invokeLater(new Runnable() {
-
-                @Override
-                public void run() {
-                    numberOfConnections++;
-                    updateLabel();
-                }
-            });
-        }
-
-        @Override
-        public void connectionClosed() {
-            SwingUtilities.invokeLater(new Runnable() {
-
-                @Override
-                public void run() {
-                    numberOfConnections--;
-                    updateLabel();
-                }
-            });
-        }
-
-        @Override
-        public void started(Group g) {
-            document.addElement(g);
-        }
-    };
-
-    private void updateLabel() {
-        if (numberOfConnections == 0) {
-            label.setText(String.format("Listening on %d", port));
-            label.setFont(label.getFont().deriveFont(Font.PLAIN));
-        } else {
-            label.setText(String.format("%d connections", numberOfConnections));
-            label.setFont(label.getFont().deriveFont(Font.BOLD));
-        }
-    }
-
-    private void updateServer() {
-        int curPort = Integer.parseInt(Settings.get().get(Settings.PORT, Settings.PORT_DEFAULT));
-        if (curPort != port) {
-            port = curPort;
-            if (server != null) {
-                server.shutdown();
-            }
-            server = Server.start(callback, port);
-            SwingUtilities.invokeLater(new Runnable() {
-
-                @Override
-                public void run() {
-                    updateLabel();
-                }
-            });
-        }
-    }
-
-    public ServerPanel(GraphDocument document) {
-
-        this.document = document;
-        Settings.get().addPreferenceChangeListener(preferenceChanged);
-        label = new JLabel();
-        label.setBorder(BorderFactory.createEmptyBorder(0, BORDER_SIZE, 0, BORDER_SIZE));
-        this.setLayout(new BorderLayout());
-        this.add(label, BorderLayout.WEST);
-        updateServer();
-    }
-
-    public Component getToolbarPresenter() {
-        return label;
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/OutlineView/manifest.mf	Sun Feb 05 00:46:25 2012 +0100
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+OpenIDE-Module: com.oracle.graal.visualizer.outline
+OpenIDE-Module-Layer: com/oracle/graal/visualizer/outline/layer.xml
+OpenIDE-Module-Localizing-Bundle: com/oracle/graal/visualizer/outline/Bundle.properties
+OpenIDE-Module-Specification-Version: 1.0
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/Bundle.properties	Sun Feb 05 00:46:25 2012 +0100
@@ -0,0 +1,5 @@
+AdvancedOption_DisplayName_Coordinator=Settings
+AdvancedOption_Tooltip_Coordinator=Visualization Tool Settings
+CTL_OutlineTopComponent=Outline
+HINT_OutlineTopComponent=Displays loaded compilations.
+OpenIDE-Module-Name=OutlineView
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/CompilationNode.java	Sun Feb 05 00:46:25 2012 +0100
@@ -0,0 +1,148 @@
+/*
+ * 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.outline;
+
+import com.sun.hotspot.igv.data.*;
+import com.sun.hotspot.igv.data.services.GraphViewer;
+import java.awt.Image;
+import java.util.ArrayList;
+import java.util.List;
+import javax.swing.Action;
+import javax.swing.JOptionPane;
+import org.openide.actions.OpenAction;
+import org.openide.cookies.OpenCookie;
+import org.openide.nodes.AbstractNode;
+import org.openide.nodes.Children;
+import org.openide.nodes.Node;
+import org.openide.util.ImageUtilities;
+import org.openide.util.Lookup;
+import org.openide.util.lookup.AbstractLookup;
+import org.openide.util.lookup.InstanceContent;
+import org.openide.util.lookup.Lookups;
+
+public class CompilationNode extends AbstractNode implements ChangedListener {
+
+    private CompilationNode(final Folder folder, Children children, InstanceContent content) {
+        super(children, new AbstractLookup(content));
+        this.setDisplayName(folder.getName());
+
+        if (folder instanceof Group) {
+            content.add(new OpenCookie() {
+
+                @Override
+                public void open() {
+                    final List<InputGraph> graphs = ((Group) folder).getGraphs();
+                    if (graphs.isEmpty()) {
+                        JOptionPane.showMessageDialog(null, "Cannot open compilation, because there was no snapshots recorded!");
+                    } else {
+                        Lookup.getDefault().lookup(GraphViewer.class).view(graphs.get(0));
+                    }
+                }
+            });
+        }
+        content.add(folder);
+        folder.getChangedEvent().addListener(this);
+    }
+
+    @Override
+    public void changed(Object folder) {
+        if (this.getChildren() == Children.LEAF) {
+            setChildren(createFolderChildren((Folder) folder));
+            this.fireIconChange();
+        }
+    }
+
+    private static class FolderChildren extends Children.Keys<Folder> {
+
+        private final Folder folder;
+
+        public FolderChildren(Folder folder) {
+            this.folder = folder;
+            folder.getChangedEvent().addListener(changedListener);
+        }
+
+        @Override
+        protected Node[] createNodes(Folder e) {
+            return new Node[]{new CompilationNode(e)};
+        }
+
+        @Override
+        public void addNotify() {
+            List<Folder> result = new ArrayList<>();
+            for (FolderElement o : folder.getElements()) {
+                if (o instanceof Folder) {
+                    result.add((Folder) o);
+                }
+            }
+            this.setKeys(result);
+        }
+        private final ChangedListener changedListener = new ChangedListener() {
+
+            @Override
+            public void changed(Object source) {
+                addNotify();
+            }
+        };
+    }
+
+    @Override
+    public Image getIcon(int i) {
+        if (this.getChildren() == Children.LEAF) {
+            return ImageUtilities.loadImage("com/oracle/graal/visualizer/outline/images/leaf_node.gif");
+        } else {
+            return ImageUtilities.loadImage("com/oracle/graal/visualizer/outline/images/node.gif");
+        }
+    }
+
+    protected CompilationNode(Folder folder) {
+        this(folder, createFolderChildren(folder), new InstanceContent());
+    }
+
+    private static Children createFolderChildren(Folder folder) {
+        for (FolderElement elem : folder.getElements()) {
+            if (elem instanceof Folder) {
+                return new FolderChildren(folder);
+            }
+        }
+        return Children.LEAF;
+    }
+
+    @Override
+    public Action[] getActions(boolean context) {
+        List<Action> actions = new ArrayList<>();
+        actions.add((Action) OpenAction.findObject(OpenAction.class, true));
+        actions.addAll(Lookups.forPath(OutlineTopComponent.NODE_ACTIONS_FOLDER).lookupAll(Action.class));
+        return actions.toArray(new Action[actions.size()]);
+    }
+
+    @Override
+    public Action getPreferredAction() {
+        return (Action) OpenAction.findObject(OpenAction.class, true);
+    }
+
+    @Override
+    public Image getOpenedIcon(int i) {
+        return getIcon(i);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/OutlineTopComponent.form	Sun Feb 05 00:46:25 2012 +0100
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<Form version="1.2" maxVersion="1.2" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
+  <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"/>
+  <SubComponents>
+    <Container class="javax.swing.JScrollPane" name="treeView">
+      <AuxValues>
+        <AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new BeanTreeView();"/>
+      </AuxValues>
+      <Constraints>
+        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
+          <BorderConstraints direction="Center"/>
+        </Constraint>
+      </Constraints>
+
+      <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
+    </Container>
+  </SubComponents>
+</Form>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/OutlineTopComponent.java	Sun Feb 05 00:46:25 2012 +0100
@@ -0,0 +1,228 @@
+/*
+ * 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.outline;
+
+import com.oracle.graal.visualizer.outline.server.Server;
+import com.oracle.graal.visualizer.outline.server.ServerPanel;
+import com.sun.hotspot.igv.data.GraphDocument;
+import java.awt.BorderLayout;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+import javax.swing.Action;
+import javax.swing.UIManager;
+import javax.swing.border.Border;
+import org.openide.ErrorManager;
+import org.openide.actions.GarbageCollectAction;
+import org.openide.awt.Toolbar;
+import org.openide.explorer.ExplorerManager;
+import org.openide.explorer.ExplorerUtils;
+import org.openide.explorer.view.BeanTreeView;
+import org.openide.util.ContextAwareAction;
+import org.openide.util.LookupEvent;
+import org.openide.util.LookupListener;
+import org.openide.util.NbBundle;
+import org.openide.util.lookup.Lookups;
+import org.openide.windows.TopComponent;
+import org.openide.windows.WindowManager;
+
+public final class OutlineTopComponent extends TopComponent implements ExplorerManager.Provider, LookupListener {
+
+    public static final String GLOBAL_ACTIONS_FOLDER = "Actions/Outline/Global";
+    public static final String NODE_ACTIONS_FOLDER = "Actions/Outline/Nodes";
+    public static OutlineTopComponent instance;
+    public static final String PREFERRED_ID = "OutlineTopComponent";
+    private ExplorerManager manager;
+    private GraphDocument document;
+    private Server server;
+
+    private OutlineTopComponent() {
+        initComponents();
+
+        setName(NbBundle.getMessage(OutlineTopComponent.class, "CTL_OutlineTopComponent"));
+        setToolTipText(NbBundle.getMessage(OutlineTopComponent.class, "HINT_OutlineTopComponent"));
+
+        document = new GraphDocument();
+        initListView();
+        initToolbar();
+    }
+
+    private void initListView() {
+        manager = new ExplorerManager();
+        manager.setRootContext(new CompilationNode(document));
+        ((BeanTreeView) this.treeView).setRootVisible(false);
+        associateLookup(ExplorerUtils.createLookup(manager, getActionMap()));
+    }
+
+    private void initToolbar() {
+
+        Toolbar toolbar = new Toolbar();
+        Border b = (Border) UIManager.get("Nb.Editor.Toolbar.border"); //NOI18N
+        toolbar.setBorder(b);
+        this.add(toolbar, BorderLayout.NORTH);
+        for (Action a : lookupActions(GLOBAL_ACTIONS_FOLDER)) {
+            toolbar.add(a);
+        }
+        toolbar.add(GarbageCollectAction.get(GarbageCollectAction.class).getToolbarPresenter());
+        toolbar.add(new ServerPanel(getDocument()));
+    }
+    
+    private List<Action> lookupActions(String path) {
+        List<Action> actions = new ArrayList<>();
+        for (Action a : Lookups.forPath(path).lookupAll(Action.class)) {
+            Action newAction = a;
+            if (a instanceof ContextAwareAction) {
+                newAction = ((ContextAwareAction) a).createContextAwareInstance(getLookup());
+            }
+            newAction.putValue(Action.SHORT_DESCRIPTION, newAction.getValue(Action.NAME));
+            actions.add(newAction);
+            
+        }
+        return actions;
+    }
+
+    public void clear() {
+        document.clear();
+    }
+
+    @Override
+    public ExplorerManager getExplorerManager() {
+        return manager;
+    }
+
+    public GraphDocument getDocument() {
+        return document;
+    }
+
+    /**
+     * Gets default instance. Do not use directly: reserved for *.settings files
+     * only, i.e. deserialization routines; otherwise you could get a
+     * non-deserialized instance. To obtain the singleton instance, use {@link findInstance}.
+     */
+    public static synchronized OutlineTopComponent getDefault() {
+        if (instance == null) {
+            instance = new OutlineTopComponent();
+        }
+        return instance;
+    }
+
+    /**
+     * Obtain the OutlineTopComponent instance. Never call {@link #getDefault}
+     * directly!
+     */
+    public static synchronized OutlineTopComponent findInstance() {
+        TopComponent win = WindowManager.getDefault().findTopComponent(PREFERRED_ID);
+        if (win == null) {
+            ErrorManager.getDefault().log(ErrorManager.WARNING, "Cannot find Outline component. It will not be located properly in the window system.");
+            return getDefault();
+        }
+        if (win instanceof OutlineTopComponent) {
+            return (OutlineTopComponent) win;
+        }
+        ErrorManager.getDefault().log(ErrorManager.WARNING, "There seem to be multiple components with the '" + PREFERRED_ID + "' ID. That is a potential source of errors and unexpected behavior.");
+        return getDefault();
+    }
+
+    @Override
+    public int getPersistenceType() {
+        return TopComponent.PERSISTENCE_ALWAYS;
+    }
+
+    @Override
+    public void componentOpened() {
+        this.requestActive();
+    }
+
+    @Override
+    public void componentClosed() {
+    }
+
+    @Override
+    protected String preferredID() {
+        return PREFERRED_ID;
+    }
+
+    @Override
+    public void requestActive() {
+        super.requestActive();
+        treeView.requestFocus();
+    }
+
+    @Override
+    public boolean requestFocus(boolean temporary) {
+        treeView.requestFocus();
+        return super.requestFocus(temporary);
+    }
+
+    @Override
+    protected boolean requestFocusInWindow(boolean temporary) {
+        treeView.requestFocus();
+        return super.requestFocusInWindow(temporary);
+    }
+
+    @Override
+    public void resultChanged(LookupEvent lookupEvent) {
+    }
+
+    @Override
+    public void readExternal(ObjectInput objectInput) throws IOException, ClassNotFoundException {
+        // Not called when user starts application for the first time
+        super.readExternal(objectInput);
+        ((BeanTreeView) this.treeView).setRootVisible(false);
+    }
+
+    @Override
+    public void writeExternal(ObjectOutput objectOutput) throws IOException {
+        super.writeExternal(objectOutput);
+    }
+
+    static final class ResolvableHelper implements Serializable {
+
+        private static final long serialVersionUID = 1L;
+
+        public Object readResolve() {
+            return OutlineTopComponent.getDefault();
+        }
+    }
+
+    /**
+     * 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() {
+
+        treeView = new BeanTreeView();
+
+        setLayout(new java.awt.BorderLayout());
+        add(treeView, java.awt.BorderLayout.CENTER);
+    }// </editor-fold>//GEN-END:initComponents
+    // Variables declaration - do not modify//GEN-BEGIN:variables
+    private javax.swing.JScrollPane treeView;
+    // End of variables declaration//GEN-END:variables
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/OutlineTopComponentSettings.xml	Sun Feb 05 00:46:25 2012 +0100
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE settings PUBLIC "-//NetBeans//DTD Session settings 1.0//EN" "http://www.netbeans.org/dtds/sessionsettings-1_0.dtd">
+<settings version="1.0">
+    <module name="com.oracle.graal.visualizer.outline" spec="1.0"/>
+    <instanceof class="at.openide.windows.TopComponent"/>
+    <instanceof class="com.oracle.graal.visualizer.outline.OutlineTopComponent"/>
+    <instance class="com.oracle.graal.visualizer.outline.OutlineTopComponent" method="getDefault"/>
+</settings>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/OutlineTopComponentWstcref.xml	Sun Feb 05 00:46:25 2012 +0100
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE tc-ref PUBLIC "-//NetBeans//DTD Top Component in Mode Properties 2.0//EN" "http://www.netbeans.org/dtds/tc-ref2_0.dtd">
+<tc-ref version="2.0" >
+    <module name="com.oracle.graal.visualizer.outline" spec="1.0"/>
+    <tc-id id="OutlineTopComponent"/>
+    <state opened="true"/>
+</tc-ref>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/actions/ImportAction.java	Sun Feb 05 00:46:25 2012 +0100
@@ -0,0 +1,155 @@
+/*
+ * 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.outline.actions;
+
+import com.oracle.graal.visualizer.outline.OutlineTopComponent;
+import com.sun.hotspot.igv.data.GraphDocument;
+import com.sun.hotspot.igv.data.serialization.Parser;
+import com.sun.hotspot.igv.data.serialization.XMLParser;
+import com.sun.hotspot.igv.settings.Settings;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import javax.swing.JFileChooser;
+import javax.swing.SwingUtilities;
+import javax.swing.filechooser.FileFilter;
+import org.netbeans.api.progress.ProgressHandle;
+import org.netbeans.api.progress.ProgressHandleFactory;
+import org.openide.DialogDisplayer;
+import org.openide.NotifyDescriptor;
+import org.openide.awt.ActionID;
+import org.openide.awt.ActionReference;
+import org.openide.awt.ActionReferences;
+import org.openide.awt.ActionRegistration;
+import org.openide.util.RequestProcessor;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+@ActionID(id = "com.oracle.graal.visualizer.outline.actions.ImportAction", category = "File")
+@ActionRegistration(displayName = "Import", iconBase="com/oracle/graal/visualizer/outline/images/import.png")
+@ActionReferences(value = {
+    @ActionReference(path = "Menu/File", position = 100),
+    @ActionReference(path = OutlineTopComponent.GLOBAL_ACTIONS_FOLDER)})
+public final class ImportAction implements ActionListener {
+
+    public static FileFilter getFileFilter() {
+        return new FileFilter() {
+
+            @Override
+            public boolean accept(File f) {
+                return f.getName().toLowerCase().endsWith(".xml") || f.isDirectory();
+            }
+
+            @Override
+            public String getDescription() {
+                return "XML files (*.xml)";
+            }
+        };
+    }
+
+    @Override
+    public void actionPerformed(ActionEvent e) {
+
+        JFileChooser fc = new JFileChooser();
+        fc.setFileFilter(ImportAction.getFileFilter());
+        fc.setCurrentDirectory(new File(Settings.get().get(Settings.DIRECTORY, Settings.DIRECTORY_DEFAULT)));
+
+        if (fc.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
+            File file = fc.getSelectedFile();
+
+            File dir = file;
+            if (!dir.isDirectory()) {
+                dir = dir.getParentFile();
+            }
+
+            Settings.get().put(Settings.DIRECTORY, dir.getAbsolutePath());
+
+            try {
+                final FileInputStream inputStream = new FileInputStream(file);
+                final InputSource is = new InputSource(inputStream);
+
+                final ProgressHandle handle = ProgressHandleFactory.createHandle("Opening file " + file.getName());
+                final int basis = 1000;
+                handle.start(basis);
+                final int start = inputStream.available();
+
+                final XMLParser.ParseMonitor parseMonitor = new XMLParser.ParseMonitor() {
+
+                    @Override
+                    public void setProgress(double d) {
+                        try {
+                            int curAvailable = inputStream.available();
+                            int prog = (int) (basis * (double) (start - curAvailable) / (double) start);
+                            handle.progress(prog);
+                        } catch (IOException ex) {
+                        }
+                    }
+
+                    @Override
+                    public void setState(String state) {
+                        setProgress(0.0);
+                        handle.progress(state);
+                    }
+                };
+                final Parser parser = new Parser();
+                final OutlineTopComponent component = OutlineTopComponent.findInstance();
+
+                component.requestActive();
+
+                RequestProcessor.getDefault().post(new Runnable() {
+
+                    @Override
+                    public void run() {
+                        try {
+                            final GraphDocument document = parser.parse(is, parseMonitor);
+                            parseMonitor.setState("Finishing");
+                            SwingUtilities.invokeLater(new Runnable(){
+
+                                @Override
+                                public void run() {
+                                    component.getDocument().addGraphDocument(document);
+                                }
+                            });
+                        } catch (SAXException ex) {
+                            String s = "Exception during parsing the XML file, could not load document!";
+                            if (ex instanceof XMLParser.MissingAttributeException) {
+                                XMLParser.MissingAttributeException e = (XMLParser.MissingAttributeException) ex;
+                                s += "\nMissing attribute \"" + e.getAttributeName() + "\"";
+                            }
+                            NotifyDescriptor d = new NotifyDescriptor.Message(s, NotifyDescriptor.ERROR_MESSAGE);
+                            DialogDisplayer.getDefault().notify(d);
+                        }
+                        handle.finish();
+                    }
+                });
+
+            } catch (IOException ex) {
+                DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message("Error reading file!", NotifyDescriptor.ERROR_MESSAGE));
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/actions/OutlineAction.java	Sun Feb 05 00:46:25 2012 +0100
@@ -0,0 +1,45 @@
+/*
+ * 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.outline.actions;
+
+import com.oracle.graal.visualizer.outline.OutlineTopComponent;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import org.openide.awt.ActionID;
+import org.openide.awt.ActionReference;
+import org.openide.awt.ActionRegistration;
+import org.openide.windows.TopComponent;
+
+@ActionID(id = "com.oracle.graal.visualizer.outline.actions.OutlineAction", category = "Window")
+@ActionRegistration(displayName = "Compilations")
+@ActionReference(path = "Menu/Window", name = "OutlineAction")
+public class OutlineAction implements ActionListener {
+    @Override
+    public void actionPerformed(ActionEvent evt) {
+        TopComponent win = OutlineTopComponent.findInstance();
+        win.open();
+        win.requestActive();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/actions/RemoveAction.java	Sun Feb 05 00:46:25 2012 +0100
@@ -0,0 +1,55 @@
+/*
+ * 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.outline.actions;
+
+import com.oracle.graal.visualizer.outline.OutlineTopComponent;
+import com.sun.hotspot.igv.data.FolderElement;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.List;
+import org.openide.awt.ActionID;
+import org.openide.awt.ActionReference;
+import org.openide.awt.ActionReferences;
+import org.openide.awt.ActionRegistration;
+
+@ActionID(id = "com.oracle.graal.visualizer.outline.actions.RemoveAction", category = "Edit")
+@ActionRegistration(displayName = "Remove", iconBase = "com/oracle/graal/visualizer/outline/images/remove.png")
+@ActionReferences(value = {
+    @ActionReference(path = "Menu/File", position = 400),
+    @ActionReference(path = OutlineTopComponent.NODE_ACTIONS_FOLDER)})
+public final class RemoveAction implements ActionListener {
+
+    List<FolderElement> elements;
+
+    public RemoveAction(List<FolderElement> elements) {
+        this.elements = elements;
+    }
+
+    @Override
+    public void actionPerformed(ActionEvent e) {
+        for (FolderElement element : elements) {
+            element.getParent().removeElement(element);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/actions/RemoveAllAction.java	Sun Feb 05 00:46:25 2012 +0100
@@ -0,0 +1,46 @@
+/*
+ * 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.  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.outline.actions;
+
+import com.oracle.graal.visualizer.outline.OutlineTopComponent;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import org.openide.awt.ActionID;
+import org.openide.awt.ActionReference;
+import org.openide.awt.ActionReferences;
+import org.openide.awt.ActionRegistration;
+
+@ActionID(id = "com.oracle.graal.visualizer.outline.actions.RemoveAllAction", category = "Edit")
+@ActionRegistration(displayName = "Remove all", iconBase = "com/oracle/graal/visualizer/outline/images/removeall.png")
+@ActionReferences(value = {
+    @ActionReference(path = "Menu/File", position = 500),
+    @ActionReference(path = OutlineTopComponent.GLOBAL_ACTIONS_FOLDER)})
+public final class RemoveAllAction implements ActionListener {
+
+    @Override
+    public void actionPerformed(ActionEvent e) {
+        OutlineTopComponent.findInstance().clear();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/actions/SaveAllAction.java	Sun Feb 05 00:46:25 2012 +0100
@@ -0,0 +1,47 @@
+/*
+ * 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.  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.outline.actions;
+
+import com.oracle.graal.visualizer.outline.OutlineTopComponent;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import org.openide.awt.ActionID;
+import org.openide.awt.ActionReference;
+import org.openide.awt.ActionReferences;
+import org.openide.awt.ActionRegistration;
+
+@ActionID(id = "com.oracle.graal.visualizer.outline.actions.SaveAllAction", category = "File")
+@ActionRegistration(displayName = "Save all..", iconBase = "com/oracle/graal/visualizer/outline/images/saveall.gif")
+@ActionReferences(value = {
+    @ActionReference(path = "Menu/File", position = 300),
+    @ActionReference(path = OutlineTopComponent.GLOBAL_ACTIONS_FOLDER)})
+public final class SaveAllAction implements ActionListener {
+
+    @Override
+    public void actionPerformed(ActionEvent e) {
+        final OutlineTopComponent component = OutlineTopComponent.findInstance();
+        SaveAsAction.save(component.getDocument());
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/actions/SaveAsAction.java	Sun Feb 05 00:46:25 2012 +0100
@@ -0,0 +1,105 @@
+/*
+ * 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.outline.actions;
+
+import com.oracle.graal.visualizer.outline.OutlineTopComponent;
+import com.sun.hotspot.igv.data.Folder;
+import com.sun.hotspot.igv.data.FolderElement;
+import com.sun.hotspot.igv.data.GraphDocument;
+import com.sun.hotspot.igv.data.serialization.Printer;
+import com.sun.hotspot.igv.settings.Settings;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.*;
+import java.util.List;
+import javax.swing.JFileChooser;
+import javax.swing.JOptionPane;
+import org.openide.awt.ActionID;
+import org.openide.awt.ActionReference;
+import org.openide.awt.ActionReferences;
+import org.openide.awt.ActionRegistration;
+
+@ActionID(id = "com.oracle.graal.visualizer.outline.actions.SaveAsAction", category = "File")
+@ActionRegistration(displayName = "Save as...", iconBase="com/oracle/graal/visualizer/outline/images/save.png")
+@ActionReferences(value = {
+    @ActionReference(path = "Menu/File", position = 200),
+    @ActionReference(path = OutlineTopComponent.NODE_ACTIONS_FOLDER)})
+public final class SaveAsAction implements ActionListener {
+
+    private final List<FolderElement> elements;
+    
+    public SaveAsAction(List<FolderElement> elements) {
+        this.elements = elements;
+    }
+
+
+    @Override
+    public void actionPerformed(ActionEvent e) {
+        GraphDocument doc = new GraphDocument();
+        outer: for (FolderElement element : elements) {
+            Folder cur = element.getParent();
+            while (cur instanceof FolderElement) {
+                FolderElement curElement = (FolderElement) cur;
+                if (elements.contains(curElement)) {
+                    continue outer;
+                }
+                cur = curElement.getParent();
+            }
+            
+            Folder previousParent = element.getParent();
+            doc.addElement(element);
+            element.setParent(previousParent);
+        }
+
+        save(doc);
+    }
+
+    public static void save(GraphDocument doc) {
+        JFileChooser fc = new JFileChooser();
+        fc.setFileFilter(ImportAction.getFileFilter());
+        fc.setCurrentDirectory(new File(Settings.get().get(Settings.DIRECTORY, Settings.DIRECTORY_DEFAULT)));
+
+        if (fc.showSaveDialog(null) == JFileChooser.APPROVE_OPTION) {
+            File file = fc.getSelectedFile();
+            if (!file.getName().contains(".")) {
+                file = new File(file.getAbsolutePath() + ".xml");
+            }
+
+            File dir = file;
+            if (!dir.isDirectory()) {
+                dir = dir.getParentFile();
+            }
+            Settings.get().put(Settings.DIRECTORY, dir.getAbsolutePath());
+            try {
+                try (Writer writer = new OutputStreamWriter(new FileOutputStream(file))) {
+                    Printer p = new Printer();
+                    p.export(writer, doc);
+                }
+            } catch (IOException e) {
+                JOptionPane.showMessageDialog(null, "Error writing file " + file.getAbsolutePath());
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/customLeftWsmode.xml	Sun Feb 05 00:46:25 2012 +0100
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mode version="2.1">
+    <name unique="customLeft" />
+    <kind type="view" />
+    <state type="joined" />
+    <constraints>
+        <path orientation="horizontal" number="0" weight="0.2"/>
+        <path orientation="vertical" number="0" weight="0.75"/>
+    </constraints>
+    <bounds x="0" y="0" width="0" height="0" />
+    <frame state="0"/>
+    <active-tc id="OutlineTopComponent"/>
+    <empty-behavior permanent="false"/>
+</mode>
Binary file src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/images/import.png has changed
Binary file src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/images/leaf_node.gif has changed
Binary file src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/images/node.gif has changed
Binary file src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/images/remove.png has changed
Binary file src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/images/removeall.png has changed
Binary file src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/images/save.png has changed
Binary file src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/images/saveall.gif has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/layer.xml	Sun Feb 05 00:46:25 2012 +0100
@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.2//EN" "http://www.netbeans.org/dtds/filesystem-1_2.dtd">
+<filesystem>
+    <folder name="Actions"/>
+    
+    <folder name="Menu">
+        <folder name="File">
+            <file name="Separator2.instance_hidden"/>
+            <file name="Separator3.instance_hidden"/>
+            <file name="SeparatorOpen.instance_hidden"/>
+            <file name="SeparatorSave.instance">
+                <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+                <attr name="position" intvalue="150"/>
+            </file>
+            <file name="SeparatorRemove.instance">
+                <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+                <attr name="position" intvalue="350"/>
+            </file>
+            
+            <!-- Hidden menu entries from other modules -->
+            <file name="org-netbeans-modules-editor-ExportHtmlAction.shadow_hidden"/>
+            <file name="org-netbeans-modules-openfile-OpenFileAction.shadow_hidden"/>
+            <file name="org-netbeans-modules-openfile-RecentFileAction.shadow_hidden"/>
+            <file name="org-netbeans-modules-print-action-PageSetupAction.shadow_hidden"/>
+            <file name="org-netbeans-modules-print-action-PrintAction.shadow_hidden"/>
+            <file name="org-netbeans-modules-project-ui-CloseProject.shadow_hidden"/>
+            <file name="org-netbeans-modules-project-ui-CustomizeProject.shadow_hidden"/>
+            <file name="org-netbeans-modules-project-ui-NewFile.shadow_hidden"/>
+            <file name="org-netbeans-modules-project-ui-NewProject.shadow_hidden"/>
+            <file name="org-netbeans-modules-project-ui-OpenProject.shadow_hidden"/>
+            <file name="org-netbeans-modules-project-ui-RecentProjects.shadow_hidden"/>
+            <file name="org-netbeans-modules-project-ui-groups-GroupsMenu.shadow_hidden"/>
+            <file name="org-openide-actions-SaveAction.shadow_hidden"/>
+            <file name="org-openide-actions-SaveAllAction.shadow_hidden"/>
+            <file name="org-openide-actions-SaveAsAction.shadow_hidden"/>
+        </folder>
+        
+        <folder name="Edit">
+            <!-- Hidden menu entries from other modules -->
+            <file name="Separator1.instance_hidden"/>
+            <file name="Separator2.instance_hidden"/>
+            <file name="SeparatorAfterFindPrevious.instance_hidden"/>
+            <file name="SeparatorAfterProjectsSearch.instance_hidden"/>
+            <file name="WhereUsedAction.shadow_hidden"/>
+            <file name="org-netbeans-modules-editor-MainMenuAction$FindNextAction.instance_hidden"/>
+            <file name="org-netbeans-modules-editor-MainMenuAction$FindPreviousAction.instance_hidden"/>
+            <file name="org-netbeans-modules-editor-MainMenuAction$FindSelectionAction.instance_hidden"/>
+            <file name="org-netbeans-modules-editor-MainMenuAction$PasteFormattedAction.instance_hidden"/>
+            <file name="org-netbeans-modules-editor-MainMenuAction$SelectAllAction.instance_hidden"/>
+            <file name="org-netbeans-modules-editor-MainMenuAction$SelectIdentifierAction.instance_hidden"/>
+            <file name="org-netbeans-modules-editor-MainMenuAction$StartMacroRecordingAction.instance_hidden"/>
+            <file name="org-netbeans-modules-editor-MainMenuAction$StopMacroRecordingAction.instance_hidden"/>
+            <file name="org-netbeans-modules-search-FindInFilesAction.shadow_hidden"/>
+            <file name="org-netbeans-modules-search-ReplaceInFilesAction.shadow_hidden"/>
+            <file name="org-openide-actions-CopyAction.shadow_hidden"/>
+            <file name="org-openide-actions-CutAction.shadow_hidden"/>
+            <file name="org-openide-actions-DeleteAction.shadow_hidden"/>
+            <file name="org-openide-actions-FindAction.shadow_hidden"/>
+            <file name="org-openide-actions-PasteAction.shadow_hidden"/>
+            <file name="org-openide-actions-ReplaceAction.shadow_hidden"/>
+            <file name="sep-before-reposearch.instance_hidden"/>
+        </folder>
+        
+        <folder name="View">
+            <!-- Hidden menu entries from other modules -->
+            <file name="Separator1.instance_hidden"/>
+            <file name="Separator2.instance_hidden"/>
+            <file name="org-netbeans-core-actions-HTMLViewAction.shadow_hidden"/>
+            <file name="org-netbeans-core-actions-LogAction.shadow_hidden"/>
+            <file name="org-netbeans-core-multiview-EditorsAction.instance_hidden"/>
+            <file name="org-netbeans-core-windows-actions-ToolbarsListAction.instance_hidden"/>
+            <file name="org-netbeans-modules-editor-NbCodeFoldingAction.instance_hidden"/>
+            <file name="org-netbeans-modules-project-ui-SyncEditorWithViewsAction.shadow_hidden"/>
+            <file name="org-netbeans-modules-versioning-ShowTextAnnotationsAction.shadow_hidden"/>
+            <file name="org-netbeans-modules-versioning-diff-ShowDiffSidebarAction.shadow_hidden"/>
+            <file name="toggle-line-numbers.shadow_hidden"/>
+            <file name="toggle-non-printable-characters.shadow_hidden"/>
+            <file name="toggle-toolbar.shadow_hidden"/>
+        </folder>
+        
+        <!-- Hidden menus -->
+        <folder name="GoTo_hidden"/>
+        <folder name="Source_hidden"/>
+        <folder name="Refactoring_hidden"/>
+        <folder name="BuildProject_hidden"/>
+        <folder name="RunProject_hidden"/>
+        <folder name="Versioning_hidden"/>
+        
+        <folder name="Tools">
+            <!-- Hidden menu entries from other modules -->
+            <file name="LibrariesCustomizerAction.shadow_hidden"/>
+            <file name="PaletteManager_hidden"/>
+            <file name="Separator1.instance_hidden"/>
+            <file name="Separator2.instance_hidden"/>
+            <file name="ServerManagerAction3.shadow_hidden"/>
+            <file name="VariablesCustomizerAction.shadow_hidden"/>
+            <file name="org-netbeans-modules-autoupdate-ui-actions-PluginManagerAction.shadow_hidden"/>
+            <file name="org-netbeans-modules-favorites-templates-TemplatesAction.shadow_hidden"/>
+            <file name="org-netbeans-modules-options-OptionsWindowAction-separatorBefore.instance_hidden"/>
+            <file name="org-netbeans-modules-xml-catalog-CatalogAction.shadow_hidden"/>
+            <file name="org-openide-actions-ToolsAction.shadow_hidden"/>
+        </folder>
+        
+        <folder name="Window">
+            
+            <!-- Hidden menu entries from other modules -->
+            <file name="Debug_hidden"/>
+            <file name="Navigator_hidden"/>
+            <file name="Other_hidden"/>
+            <file name="Output_hidden"/>
+            <file name="ProgressListAction.shadow_hidden"/>
+            <file name="ShowPaletteAction.shadow_hidden"/>
+            <file name="SwitchToRecentDocumentAction.shadow_hidden"/>
+            <file name="Versioning_hidden"/>
+            <file name="org-netbeans-core-ide-ServicesTabAction.shadow_hidden"/>
+            <file name="org-netbeans-modules-favorites-View.shadow_hidden"/>
+            <file name="org-netbeans-modules-project-ui-logical-tab-action.shadow_hidden"/>
+            <file name="org-netbeans-modules-project-ui-physical-tab-action.shadow_hidden"/>
+            <file name="org-netbeans-modules-tasklist-ui-TaskListAction.shadow_hidden"/>
+            <file name="CloneDocumentAction.shadow_hidden"/>
+        </folder>
+
+        <folder name="Help">
+            <!-- Hidden menu entries from other modules -->
+            <file name="Separator1.instance_hidden"/>
+            <file name="netbeans-kb.url_hidden"/>
+            <file name="org-netbeans-modules-autoupdate-ui-actions-CheckForUpdatesAction.shadow_hidden"/>
+            <file name="org-netbeans-modules-bugzilla-ReportNBIssueAction.shadow_hidden"/>
+            <file name="org-netbeans-modules-usersguide-master.xml_hidden"/>
+            <file name="shortcuts.xml_hidden"/>
+        </folder>
+    </folder>
+
+    <folder name="OptionsDialog">
+        <!-- Hidden option tabs from other modules -->
+        <file name="Editor.instance_hidden"/>
+        <file name="FontsAndColors.instance_hidden"/>
+        <file name="General.instance_hidden"/>
+        <file name="Keymaps.instance_hidden"/>
+        <folder name="Advanced">
+            <file name="Files.instance_hidden"/>
+            <file name="IssueTracking.instance_hidden"/>
+            <file name="JavaScript.instance_hidden"/>
+            <file name="Spellchecker.instance_hidden"/>
+            <file name="TermAdvancedOption.instance_hidden"/>
+            <file name="ToDo.instance_hidden"/>
+            <file name="Versioning.instance_hidden"/>
+        </folder>
+    </folder>
+    
+    <folder name="Toolbars">
+        <file name="Build_hidden"/>
+        <file name="Clipboard_hidden"/>
+        <file name="Debug_hidden"/>
+        <file name="Debugging.xml_hidden"/>
+        <file name="File_hidden"/>
+        <file name="Memory_hidden"/>
+        <file name="Standard.xml_hidden"/>
+        <file name="UndoRedo_hidden"/>
+    </folder>
+    <folder name="Windows2">
+        <folder name="Components">
+            <file name="OutlineTopComponent.settings" url="OutlineTopComponentSettings.xml"/>
+        </folder>
+        <folder name="Modes">  
+            <file name="customLeft.wsmode" url="customLeftWsmode.xml"/>
+            <folder name="customLeft">
+                <file name="OutlineTopComponent.wstcref" url="OutlineTopComponentWstcref.xml"/>
+            </folder>
+        </folder>
+    </folder>
+    
+    
+</filesystem>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/server/Bundle.properties	Sun Feb 05 00:46:25 2012 +0100
@@ -0,0 +1,1 @@
+OpenIDE-Module-Name=NetworkConnection
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/server/Client.java	Sun Feb 05 00:46:25 2012 +0100
@@ -0,0 +1,67 @@
+/*
+ * 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.  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.outline.server;
+
+import com.sun.hotspot.igv.data.serialization.Parser;
+import java.io.BufferedInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.Socket;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+public class Client implements Runnable {
+
+    private Socket socket;
+    private ServerCallback callback;
+
+    public Client(Socket socket, ServerCallback callback) {
+        this.callback = callback;
+        this.socket = socket;
+    }
+
+    @Override
+    public void run() {
+        callback.connectionOpened(socket.getInetAddress());
+        try {
+            InputStream inputStream = new BufferedInputStream(socket.getInputStream());
+            InputSource is = new InputSource(inputStream);
+
+            try {
+                Parser parser = new Parser(callback);
+                parser.parse(is, null);
+            } catch (SAXException ex) {
+                throw new IOException(ex);
+            }
+        } catch (IOException ex) {
+        } finally {
+            try {
+                socket.close();
+            } catch (IOException ex) {
+            }
+            callback.connectionClosed();
+        }
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/server/Server.java	Sun Feb 05 00:46:25 2012 +0100
@@ -0,0 +1,89 @@
+/*
+ * 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.  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.outline.server;
+
+import java.io.IOException;
+import java.net.ServerSocket;
+import java.net.Socket;
+import org.openide.DialogDisplayer;
+import org.openide.NotifyDescriptor;
+import org.openide.util.RequestProcessor;
+
+public class Server {
+
+    private Runnable serverRunnable;
+    private ServerSocket serverSocket;
+    
+    private Server() {}
+    
+
+    public static Server start(final ServerCallback callback, int port) {
+
+        final Server server = new Server();
+        
+        try {
+            server.serverSocket = new java.net.ServerSocket(port);
+        } catch (IOException ex) {
+            NotifyDescriptor message = new NotifyDescriptor.Message("Could not create server. Listening for incoming data is disabled.", NotifyDescriptor.ERROR_MESSAGE);
+            DialogDisplayer.getDefault().notifyLater(message);
+            return null;
+        }
+
+        Runnable runnable = new Runnable() {
+
+            @Override
+            public void run() {
+                while (true) {
+                    try {
+                        Socket clientSocket = server.serverSocket.accept();
+                        if (server.serverRunnable != this) {
+                            clientSocket.close();
+                            return;
+                        }
+                        RequestProcessor.getDefault().post(new Client(clientSocket, callback), 0, Thread.MAX_PRIORITY);
+                    } catch (IOException ex) {
+                        server.serverSocket = null;
+                        NotifyDescriptor message = new NotifyDescriptor.Message("Error during listening for incoming connections. Listening for incoming data is disabled.", NotifyDescriptor.ERROR_MESSAGE);
+                        DialogDisplayer.getDefault().notifyLater(message);
+                        return;
+                    }
+                }
+            }
+        };
+
+        server.serverRunnable = runnable;
+        RequestProcessor.getDefault().post(runnable, 0, Thread.MAX_PRIORITY);
+        return server;
+    }
+
+    void shutdown() {
+        try {
+            serverSocket.close();
+        } catch (IOException ex) {
+        }
+        
+        serverSocket = null;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/server/ServerCallback.java	Sun Feb 05 00:46:25 2012 +0100
@@ -0,0 +1,37 @@
+/*
+ * 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.  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.outline.server;
+
+import com.sun.hotspot.igv.data.services.GroupCallback;
+import java.net.InetAddress;
+
+public interface ServerCallback extends GroupCallback {
+    
+    public void connectionOpened(InetAddress inetAddress);
+
+    public void connectionClosed();
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/server/ServerPanel.java	Sun Feb 05 00:46:25 2012 +0100
@@ -0,0 +1,130 @@
+/*
+ * 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.  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.outline.server;
+
+import com.sun.hotspot.igv.data.GraphDocument;
+import com.sun.hotspot.igv.data.Group;
+import com.sun.hotspot.igv.settings.Settings;
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.Font;
+import java.net.InetAddress;
+import java.util.prefs.PreferenceChangeEvent;
+import java.util.prefs.PreferenceChangeListener;
+import javax.swing.BorderFactory;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.SwingUtilities;
+
+public class ServerPanel extends JPanel {
+
+    private final static int BORDER_SIZE = 2;
+    JLabel label;
+    private Server server;
+    private int port = -1;
+    private int numberOfConnections;
+    private final GraphDocument document;
+    private final PreferenceChangeListener preferenceChanged = new PreferenceChangeListener() {
+
+        @Override
+        public void preferenceChange(PreferenceChangeEvent evt) {
+            updateServer();
+        }
+    };
+    private ServerCallback callback = new ServerCallback() {
+
+        @Override
+        public void connectionOpened(InetAddress inetAddress) {
+            SwingUtilities.invokeLater(new Runnable() {
+
+                @Override
+                public void run() {
+                    numberOfConnections++;
+                    updateLabel();
+                }
+            });
+        }
+
+        @Override
+        public void connectionClosed() {
+            SwingUtilities.invokeLater(new Runnable() {
+
+                @Override
+                public void run() {
+                    numberOfConnections--;
+                    updateLabel();
+                }
+            });
+        }
+
+        @Override
+        public void started(Group g) {
+            document.addElement(g);
+        }
+    };
+
+    private void updateLabel() {
+        if (numberOfConnections == 0) {
+            label.setText(String.format("Listening on %d", port));
+            label.setFont(label.getFont().deriveFont(Font.PLAIN));
+        } else {
+            label.setText(String.format("%d connections", numberOfConnections));
+            label.setFont(label.getFont().deriveFont(Font.BOLD));
+        }
+    }
+
+    private void updateServer() {
+        int curPort = Integer.parseInt(Settings.get().get(Settings.PORT, Settings.PORT_DEFAULT));
+        if (curPort != port) {
+            port = curPort;
+            if (server != null) {
+                server.shutdown();
+            }
+            server = Server.start(callback, port);
+            SwingUtilities.invokeLater(new Runnable() {
+
+                @Override
+                public void run() {
+                    updateLabel();
+                }
+            });
+        }
+    }
+
+    public ServerPanel(GraphDocument document) {
+
+        this.document = document;
+        Settings.get().addPreferenceChangeListener(preferenceChanged);
+        label = new JLabel();
+        label.setBorder(BorderFactory.createEmptyBorder(0, BORDER_SIZE, 0, BORDER_SIZE));
+        this.setLayout(new BorderLayout());
+        this.add(label, BorderLayout.WEST);
+        updateServer();
+    }
+
+    public Component getToolbarPresenter() {
+        return label;
+    }
+}
--- a/src/share/tools/IdealGraphVisualizer/Snapshots/src/com/oracle/graal/visualizer/snapshots/SnapshotTopComponent.java	Sat Feb 04 21:41:02 2012 +0100
+++ b/src/share/tools/IdealGraphVisualizer/Snapshots/src/com/oracle/graal/visualizer/snapshots/SnapshotTopComponent.java	Sun Feb 05 00:46:25 2012 +0100
@@ -23,22 +23,55 @@
  */
 package com.oracle.graal.visualizer.snapshots;
 
+import com.oracle.graal.visualizer.editor.EditorTopComponent;
+import com.oracle.graal.visualizer.util.LookupUtils;
+import com.sun.hotspot.igv.util.RangeSlider;
+import com.sun.hotspot.igv.util.RangeSliderModel;
+import java.awt.BorderLayout;
 import org.openide.awt.ActionID;
 import org.openide.awt.ActionReference;
+import org.openide.util.Lookup.Result;
+import org.openide.util.LookupEvent;
+import org.openide.util.LookupListener;
 import org.openide.windows.TopComponent;
 
-@TopComponent.Description(preferredID = "SnapshotTopComponent",
-persistenceType = TopComponent.PERSISTENCE_NEVER)
+@TopComponent.Description(preferredID = "SnapshotTopComponent", persistenceType = TopComponent.PERSISTENCE_NEVER)
 @TopComponent.Registration(mode = "output", openAtStartup = true)
 @ActionID(category = "Window", id = "com.oracle.graal.visualizer.snapshots.SnapshotTopComponent")
 @ActionReference(path = "Menu/Window")
 @TopComponent.OpenActionRegistration(displayName = "Snapshot", preferredID = "SnapshotTopComponent")
 public final class SnapshotTopComponent extends TopComponent {
 
+    private final Result<RangeSliderModel> result;
+    private final RangeSlider rangeSlider;
+    private final LookupListener lookupListener = new LookupListener() {
+
+        @Override
+        public void resultChanged(LookupEvent le) {
+            update();
+        }
+    };
+
     public SnapshotTopComponent() {
         initComponents();
         setName("Snapshot Window");
         setToolTipText("This is a Snapshot window");
+
+        result = LookupUtils.getLastActiveDelegatingLookup(EditorTopComponent.class).lookupResult(RangeSliderModel.class);
+        result.addLookupListener(lookupListener);
+        this.rangeSlider = new RangeSlider(null);
+        this.setLayout(new BorderLayout());
+        this.add(rangeSlider, BorderLayout.CENTER);
+        update();
+
+    }
+
+    private void update() {
+        if (result.allInstances().size() > 0) {
+            rangeSlider.setModel(result.allInstances().iterator().next());
+        } else {
+            rangeSlider.setModel(null);
+        }
     }
 
     /**
@@ -59,7 +92,6 @@
             .addGap(0, 300, Short.MAX_VALUE)
         );
     }// </editor-fold>//GEN-END:initComponents
-
     // Variables declaration - do not modify//GEN-BEGIN:variables
     // End of variables declaration//GEN-END:variables
 }
--- a/src/share/tools/IdealGraphVisualizer/Util/nbproject/project.xml	Sat Feb 04 21:41:02 2012 +0100
+++ b/src/share/tools/IdealGraphVisualizer/Util/nbproject/project.xml	Sun Feb 05 00:46:25 2012 +0100
@@ -56,6 +56,7 @@
                 </dependency>
             </module-dependencies>
             <public-packages>
+                <package>com.oracle.graal.visualizer.util</package>
                 <package>com.sun.hotspot.igv.util</package>
             </public-packages>
         </data>
--- a/src/share/tools/IdealGraphVisualizer/Util/src/com/sun/hotspot/igv/util/Bundle.properties	Sat Feb 04 21:41:02 2012 +0100
+++ b/src/share/tools/IdealGraphVisualizer/Util/src/com/sun/hotspot/igv/util/Bundle.properties	Sun Feb 05 00:46:25 2012 +0100
@@ -1,1 +1,1 @@
-OpenIDE-Module-Name=Util
+OpenIDE-Module-Name=Util
--- a/src/share/tools/IdealGraphVisualizer/Util/src/com/sun/hotspot/igv/util/RangeSlider.java	Sat Feb 04 21:41:02 2012 +0100
+++ b/src/share/tools/IdealGraphVisualizer/Util/src/com/sun/hotspot/igv/util/RangeSlider.java	Sun Feb 05 00:46:25 2012 +0100
@@ -32,7 +32,7 @@
 import java.util.List;
 import javax.swing.JComponent;
 
-public class RangeSlider extends JComponent {
+public final class RangeSlider extends JComponent {
 
     public static final int BAR_THICKNESS = 2;
     public static final int BAR_CIRCLE_SIZE = 9;
@@ -51,8 +51,7 @@
     public RangeSlider(RangeSliderModel newModel) {
         this.addMouseMotionListener(mouseMotionListener);
         this.addMouseListener(mouseListener);
-        newModel.getChangedEvent().addListener(modelChangedListener);
-        this.model = newModel;
+        setModel(newModel);
     }
 
     private RangeSliderModel getPaintingModel() {
@@ -82,8 +81,8 @@
         d.height = ITEM_HEIGHT * list.size();
         return d;
     }
-    
     private ChangedListener<RangeSliderModel> modelChangedListener = new ChangedListener<RangeSliderModel>() {
+
         @Override
         public void changed(RangeSliderModel source) {
             update();
@@ -208,17 +207,21 @@
 
         @Override
         public void mouseClicked(MouseEvent e) {
-            int index = getIndexFromPosition(e.getPoint().y);
-            model.setPositions(index, index);
+            if (model != null) {
+                int index = getIndexFromPosition(e.getPoint().y);
+                model.setPositions(index, index);
+            }
         }
 
         @Override
         public void mousePressed(MouseEvent e) {
-            int index = getIndexFromPosition(e.getPoint().y);
-            startPoint = e.getPoint();
-            tempModel = model.copy();
-            tempModel.getChangedEvent().addListener(modelChangedListener);
-            tempModel.setPositions(index, index);
+            if (model != null) {
+                int index = getIndexFromPosition(e.getPoint().y);
+                startPoint = e.getPoint();
+                tempModel = model.copy();
+                tempModel.getChangedEvent().addListener(modelChangedListener);
+                tempModel.setPositions(index, index);
+            }
         }
 
         @Override
@@ -240,4 +243,18 @@
             repaint();
         }
     };
+
+    public void setModel(RangeSliderModel newModel) {
+        if (newModel != this.model) {
+            if (this.model != null) {
+                this.model.getChangedEvent().removeListener(modelChangedListener);
+            }
+            this.model = newModel;
+            if (newModel != null) {
+                newModel.getChangedEvent().addListener(modelChangedListener);
+            }
+            this.tempModel = null;
+            update();
+        }
+    }
 }
--- a/src/share/tools/IdealGraphVisualizer/nbproject/project.properties	Sat Feb 04 21:41:02 2012 +0100
+++ b/src/share/tools/IdealGraphVisualizer/nbproject/project.properties	Sun Feb 05 00:46:25 2012 +0100
@@ -4,7 +4,6 @@
 branding.token=${app.name}
 modules=\
     ${project.com.sun.hotspot.igv.graph}:\
-    ${project.com.oracle.graal.visualizer.outline}:\
     ${project.com.sun.hotspot.igv.filter}:\
     ${project.com.sun.hotspot.igv.hierarchicallayout}:\
     ${project.com.sun.hotspot.igv.layout}:\
@@ -20,12 +19,11 @@
     ${project.at.ssw.visualizer.cfg}:\
     ${project.org.eclipse.draw2d}:\
     ${project.com.oracle.graal.visualizer.editor}:\
-    ${project.com.oracle.graal.visualizer.snapshots}
+    ${project.com.oracle.graal.visualizer.outline}
 project.at.ssw.visualizer.cfg=ControlFlowEditor
 project.com.oracle.graal.visualizer.editor=Editor
-project.com.oracle.graal.visualizer.snapshots=Snapshots
+project.com.oracle.graal.visualizer.outline=OutlineView
 project.com.sun.hotspot.igv.bytecodes=Bytecodes
-project.com.oracle.graal.visualizer.outline=Outline
 project.com.sun.hotspot.igv.data=Data
 project.com.sun.hotspot.igv.difference=Difference
 project.com.sun.hotspot.igv.filter=Filter