changeset 4505:5d9c4796912d

Fix window modes. Open snapshot view on startup.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Sun, 05 Feb 2012 05:37:52 +0100
parents 88f091c2232d
children ab7c258e1cef
files src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/SelectBytecodesAction.java 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/OutlineAction.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/layer.xml src/share/tools/IdealGraphVisualizer/SnapshotsView/manifest.mf src/share/tools/IdealGraphVisualizer/SnapshotsView/src/com/oracle/graal/visualizer/snapshots/SnapshotTopComponent.java src/share/tools/IdealGraphVisualizer/SnapshotsView/src/com/oracle/graal/visualizer/snapshots/belowExplorerWsmode.xml src/share/tools/IdealGraphVisualizer/SnapshotsView/src/com/oracle/graal/visualizer/snapshots/layer.xml
diffstat 11 files changed, 34 insertions(+), 92 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/SelectBytecodesAction.java	Sun Feb 05 05:05:51 2012 +0100
+++ b/src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/SelectBytecodesAction.java	Sun Feb 05 05:37:52 2012 +0100
@@ -24,7 +24,6 @@
 package com.sun.hotspot.igv.bytecodes;
 
 import com.sun.hotspot.igv.data.services.InputGraphProvider;
-import com.sun.hotspot.igv.util.LookupHistory;
 import org.openide.nodes.Node;
 import org.openide.util.HelpCtx;
 import org.openide.util.NbBundle;
--- a/src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/OutlineTopComponent.java	Sun Feb 05 05:05:51 2012 +0100
+++ b/src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/OutlineTopComponent.java	Sun Feb 05 05:37:52 2012 +0100
@@ -29,6 +29,8 @@
 import java.awt.BorderLayout;
 import javax.swing.Action;
 import org.openide.actions.GarbageCollectAction;
+import org.openide.awt.ActionID;
+import org.openide.awt.ActionReference;
 import org.openide.awt.Toolbar;
 import org.openide.explorer.ExplorerManager;
 import org.openide.explorer.ExplorerUtils;
@@ -37,6 +39,11 @@
 import org.openide.windows.TopComponent;
 import org.openide.windows.WindowManager;
 
+@TopComponent.Description(preferredID = OutlineTopComponent.PREFERRED_ID, persistenceType = TopComponent.PERSISTENCE_ALWAYS)
+@TopComponent.Registration(mode = "explorer", openAtStartup = true)
+@ActionID(category = "Window", id = "com.oracle.graal.visualizer.outline.OutlineTopComponent")
+@ActionReference(path = "Menu/Window")
+@TopComponent.OpenActionRegistration(displayName = "Outline", preferredID = OutlineTopComponent.PREFERRED_ID)
 public final class OutlineTopComponent extends TopComponent implements ExplorerManager.Provider {
 
     public static final String GLOBAL_ACTIONS_FOLDER = "Actions/Outline/Global";
--- a/src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/OutlineTopComponentSettings.xml	Sun Feb 05 05:05:51 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/OutlineView/src/com/oracle/graal/visualizer/outline/OutlineTopComponentWstcref.xml	Sun Feb 05 05:05:51 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/OutlineView/src/com/oracle/graal/visualizer/outline/actions/OutlineAction.java	Sun Feb 05 05:05:51 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/OutlineView/src/com/oracle/graal/visualizer/outline/customLeftWsmode.xml	Sun Feb 05 05:05:51 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>
--- a/src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/layer.xml	Sun Feb 05 05:05:51 2012 +0100
+++ b/src/share/tools/IdealGraphVisualizer/OutlineView/src/com/oracle/graal/visualizer/outline/layer.xml	Sun Feb 05 05:37:52 2012 +0100
@@ -158,17 +158,4 @@
         <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/SnapshotsView/manifest.mf	Sun Feb 05 05:05:51 2012 +0100
+++ b/src/share/tools/IdealGraphVisualizer/SnapshotsView/manifest.mf	Sun Feb 05 05:37:52 2012 +0100
@@ -1,5 +1,6 @@
 Manifest-Version: 1.0
 OpenIDE-Module: com.oracle.graal.visualizer.snapshots
+OpenIDE-Module-Layer: com/oracle/graal/visualizer/snapshots/layer.xml
 OpenIDE-Module-Localizing-Bundle: com/oracle/graal/visualizer/snapshots/Bundle.properties
 OpenIDE-Module-Requires: org.openide.windows.WindowManager
 OpenIDE-Module-Specification-Version: 1.0
--- a/src/share/tools/IdealGraphVisualizer/SnapshotsView/src/com/oracle/graal/visualizer/snapshots/SnapshotTopComponent.java	Sun Feb 05 05:05:51 2012 +0100
+++ b/src/share/tools/IdealGraphVisualizer/SnapshotsView/src/com/oracle/graal/visualizer/snapshots/SnapshotTopComponent.java	Sun Feb 05 05:37:52 2012 +0100
@@ -39,11 +39,11 @@
 import org.openide.windows.TopComponent;
 import org.openide.windows.WindowManager;
 
-@TopComponent.Description(preferredID = SnapshotTopComponent.PREFERRED_ID, persistenceType = TopComponent.PERSISTENCE_NEVER)
-@TopComponent.Registration(mode = "output", openAtStartup = true)
+@TopComponent.Description(preferredID = SnapshotTopComponent.PREFERRED_ID, persistenceType = TopComponent.PERSISTENCE_ALWAYS)
+@TopComponent.Registration(mode = "belowExplorer", openAtStartup = true)
 @ActionID(category = "Window", id = "com.oracle.graal.visualizer.snapshots.SnapshotTopComponent")
 @ActionReference(path = "Menu/Window")
-@TopComponent.OpenActionRegistration(displayName = "Snapshot", preferredID = "SnapshotTopComponent")
+@TopComponent.OpenActionRegistration(displayName = "Snapshot", preferredID = SnapshotTopComponent.PREFERRED_ID)
 public final class SnapshotTopComponent extends TopComponent {
     public static final String PREFERRED_ID = "SnapshotTopComponent";
 
@@ -76,7 +76,6 @@
         this.rangeSlider = new RangeSlider(null);
         this.setLayout(new BorderLayout());
         this.add(new JScrollPane(rangeSlider), BorderLayout.CENTER);
-        LookupUtils.lookupActions("Actions/View");
         update();
     }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/SnapshotsView/src/com/oracle/graal/visualizer/snapshots/belowExplorerWsmode.xml	Sun Feb 05 05:37:52 2012 +0100
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mode version="2.4">
+    <name unique="belowExplorer"/>
+    <kind type="view"/>
+    <state type="joined"/>
+    <constraints>
+        <path orientation="horizontal" number="20" weight="0.3"/>
+        <path orientation="vertical" number="21" weight="0.548"/>
+    </constraints>
+    <bounds x="0" y="0" width="0" height="0"/>
+    <frame state="0"/>
+    
+    <empty-behavior permanent="false"/>
+</mode>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/SnapshotsView/src/com/oracle/graal/visualizer/snapshots/layer.xml	Sun Feb 05 05:37:52 2012 +0100
@@ -0,0 +1,9 @@
+<?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="Windows2">
+        <folder name="Modes">  
+            <file name="belowExplorer.wsmode" url="belowExplorerWsmode.xml"/>
+        </folder>
+    </folder>
+</filesystem>