# HG changeset patch # User Thomas Wuerthinger # Date 1328399530 -3600 # Node ID 5ddea75b496ab4d3238c7aa842514fcca76c14ce # Parent f721895e62e88acb1726f1dbfa020419a291241c Renamed snapshots to snapshots view. diff -r f721895e62e8 -r 5ddea75b496a src/share/tools/IdealGraphVisualizer/Snapshots/manifest.mf --- a/src/share/tools/IdealGraphVisualizer/Snapshots/manifest.mf Sun Feb 05 00:46:25 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.snapshots -OpenIDE-Module-Localizing-Bundle: com/oracle/graal/visualizer/snapshots/Bundle.properties -OpenIDE-Module-Requires: org.openide.windows.WindowManager -OpenIDE-Module-Specification-Version: 1.0 - diff -r f721895e62e8 -r 5ddea75b496a src/share/tools/IdealGraphVisualizer/Snapshots/src/com/oracle/graal/visualizer/snapshots/Bundle.properties --- a/src/share/tools/IdealGraphVisualizer/Snapshots/src/com/oracle/graal/visualizer/snapshots/Bundle.properties Sun Feb 05 00:46:25 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -OpenIDE-Module-Name=Snapshots diff -r f721895e62e8 -r 5ddea75b496a src/share/tools/IdealGraphVisualizer/Snapshots/src/com/oracle/graal/visualizer/snapshots/SnapshotTopComponent.form --- a/src/share/tools/IdealGraphVisualizer/Snapshots/src/com/oracle/graal/visualizer/snapshots/SnapshotTopComponent.form Sun Feb 05 00:46:25 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
diff -r f721895e62e8 -r 5ddea75b496a src/share/tools/IdealGraphVisualizer/Snapshots/src/com/oracle/graal/visualizer/snapshots/SnapshotTopComponent.java --- a/src/share/tools/IdealGraphVisualizer/Snapshots/src/com/oracle/graal/visualizer/snapshots/SnapshotTopComponent.java Sun Feb 05 00:46:25 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,97 +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.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.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 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); - } - } - - /** - * 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. - */ - // //GEN-BEGIN:initComponents - private void initComponents() { - - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); - this.setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 400, Short.MAX_VALUE) - ); - layout.setVerticalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 300, Short.MAX_VALUE) - ); - }// //GEN-END:initComponents - // Variables declaration - do not modify//GEN-BEGIN:variables - // End of variables declaration//GEN-END:variables -} diff -r f721895e62e8 -r 5ddea75b496a src/share/tools/IdealGraphVisualizer/SnapshotsView/manifest.mf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/share/tools/IdealGraphVisualizer/SnapshotsView/manifest.mf Sun Feb 05 00:52:10 2012 +0100 @@ -0,0 +1,6 @@ +Manifest-Version: 1.0 +OpenIDE-Module: com.oracle.graal.visualizer.snapshots +OpenIDE-Module-Localizing-Bundle: com/oracle/graal/visualizer/snapshots/Bundle.properties +OpenIDE-Module-Requires: org.openide.windows.WindowManager +OpenIDE-Module-Specification-Version: 1.0 + diff -r f721895e62e8 -r 5ddea75b496a src/share/tools/IdealGraphVisualizer/SnapshotsView/src/com/oracle/graal/visualizer/snapshots/Bundle.properties --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/share/tools/IdealGraphVisualizer/SnapshotsView/src/com/oracle/graal/visualizer/snapshots/Bundle.properties Sun Feb 05 00:52:10 2012 +0100 @@ -0,0 +1,1 @@ +OpenIDE-Module-Name=SnapshotsView diff -r f721895e62e8 -r 5ddea75b496a src/share/tools/IdealGraphVisualizer/SnapshotsView/src/com/oracle/graal/visualizer/snapshots/SnapshotTopComponent.form --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/share/tools/IdealGraphVisualizer/SnapshotsView/src/com/oracle/graal/visualizer/snapshots/SnapshotTopComponent.form Sun Feb 05 00:52:10 2012 +0100 @@ -0,0 +1,28 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
diff -r f721895e62e8 -r 5ddea75b496a src/share/tools/IdealGraphVisualizer/SnapshotsView/src/com/oracle/graal/visualizer/snapshots/SnapshotTopComponent.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/share/tools/IdealGraphVisualizer/SnapshotsView/src/com/oracle/graal/visualizer/snapshots/SnapshotTopComponent.java Sun Feb 05 00:52:10 2012 +0100 @@ -0,0 +1,97 @@ +/* + * 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.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.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 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); + } + } + + /** + * 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. + */ + // //GEN-BEGIN:initComponents + private void initComponents() { + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); + this.setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 400, Short.MAX_VALUE) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 300, Short.MAX_VALUE) + ); + }// //GEN-END:initComponents + // Variables declaration - do not modify//GEN-BEGIN:variables + // End of variables declaration//GEN-END:variables +} diff -r f721895e62e8 -r 5ddea75b496a src/share/tools/IdealGraphVisualizer/nbproject/project.properties --- a/src/share/tools/IdealGraphVisualizer/nbproject/project.properties Sun Feb 05 00:46:25 2012 +0100 +++ b/src/share/tools/IdealGraphVisualizer/nbproject/project.properties Sun Feb 05 00:52:10 2012 +0100 @@ -19,10 +19,12 @@ ${project.at.ssw.visualizer.cfg}:\ ${project.org.eclipse.draw2d}:\ ${project.com.oracle.graal.visualizer.editor}:\ - ${project.com.oracle.graal.visualizer.outline} + ${project.com.oracle.graal.visualizer.outline}:\ + ${project.com.oracle.graal.visualizer.snapshots} project.at.ssw.visualizer.cfg=ControlFlowEditor project.com.oracle.graal.visualizer.editor=Editor project.com.oracle.graal.visualizer.outline=OutlineView +project.com.oracle.graal.visualizer.snapshots=SnapshotsView project.com.sun.hotspot.igv.bytecodes=Bytecodes project.com.sun.hotspot.igv.data=Data project.com.sun.hotspot.igv.difference=Difference