Skip to content

Commit bcfa654

Browse files
jisedlacthurka
authored andcommitted
Do not rely on NetBeans-side DataObject when opening a profiler snapshot.
1 parent 34cd81a commit bcfa654

File tree

4 files changed

+7
-28
lines changed

4 files changed

+7
-28
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
build.xml.data.CRC32=d78c4b18
1+
build.xml.data.CRC32=7374b11b
22
build.xml.script.CRC32=03a7511e
33
build.xml.stylesheet.CRC32=[email protected]
44
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
55
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
6-
nbproject/build-impl.xml.data.CRC32=d78c4b18
6+
nbproject/build-impl.xml.data.CRC32=7374b11b
77
nbproject/build-impl.xml.script.CRC32=6c1a4403
88
nbproject/build-impl.xml.stylesheet.CRC32=[email protected]

visualvm/profiling/nbproject/project.xml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -129,14 +129,6 @@
129129
<specification-version>9.11</specification-version>
130130
</run-dependency>
131131
</dependency>
132-
<dependency>
133-
<code-name-base>org.openide.loaders</code-name-base>
134-
<build-prerequisite/>
135-
<compile-dependency/>
136-
<run-dependency>
137-
<specification-version>7.67</specification-version>
138-
</run-dependency>
139-
</dependency>
140132
<dependency>
141133
<code-name-base>org.openide.modules</code-name-base>
142134
<build-prerequisite/>
@@ -145,14 +137,6 @@
145137
<specification-version>7.17.1</specification-version>
146138
</run-dependency>
147139
</dependency>
148-
<dependency>
149-
<code-name-base>org.openide.nodes</code-name-base>
150-
<build-prerequisite/>
151-
<compile-dependency/>
152-
<run-dependency>
153-
<specification-version>7.28.1</specification-version>
154-
</run-dependency>
155-
</dependency>
156140
<dependency>
157141
<code-name-base>org.openide.util</code-name-base>
158142
<build-prerequisite/>

visualvm/profiling/src/com/sun/tools/visualvm/profiling/snapshot/ProfilerSnapshotCategory.java

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,16 @@
2626
package com.sun.tools.visualvm.profiling.snapshot;
2727

2828
import com.sun.tools.visualvm.core.snapshot.SnapshotCategory;
29+
import com.sun.tools.visualvm.core.ui.DataSourceWindowManager;
2930
import java.io.File;
3031
import java.util.logging.Level;
3132
import java.util.logging.Logger;
3233
import javax.swing.SwingUtilities;
3334
import javax.swing.filechooser.FileFilter;
34-
import org.netbeans.api.actions.Openable;
3535
import org.netbeans.api.progress.ProgressHandle;
3636
import org.netbeans.api.progress.ProgressHandleFactory;
3737
import org.netbeans.modules.profiler.ResultsManager;
3838
import org.netbeans.modules.profiler.api.ProfilerDialogs;
39-
import org.openide.filesystems.FileObject;
40-
import org.openide.filesystems.FileUtil;
41-
import org.openide.loaders.DataObject;
4239
import org.openide.util.NbBundle;
4340
import org.openide.util.RequestProcessor;
4441

@@ -83,10 +80,8 @@ public void run() {
8380
pHandle.setInitialDelay(0);
8481
pHandle.start();
8582
try {
86-
FileObject fileObject = FileUtil.toFileObject(file);
87-
DataObject dobj = DataObject.find(fileObject);
88-
Openable openCookie = dobj.getLookup().lookup(Openable.class);
89-
openCookie.open();
83+
ProfilerSnapshot snapshot = ProfilerSnapshot.createSnapshot(file, null);
84+
DataSourceWindowManager.sharedInstance().openDataSource(snapshot);
9085
} catch (Exception e) {
9186
LOGGER.log(Level.INFO, "Error loading profiler snapshot", e); // NOI18N
9287
SwingUtilities.invokeLater(new Runnable() {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
build.xml.data.CRC32=f6079f93
1+
build.xml.data.CRC32=20861fe1
22
build.xml.script.CRC32=8a00031d
33
build.xml.stylesheet.CRC32=[email protected]
44
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
55
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
6-
nbproject/build-impl.xml.data.CRC32=f6079f93
6+
nbproject/build-impl.xml.data.CRC32=20861fe1
77
nbproject/build-impl.xml.script.CRC32=584e6d59
88
nbproject/build-impl.xml.stylesheet.CRC32=[email protected]

0 commit comments

Comments
 (0)