File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
src/org/graalvm/visualvm/core/explorer Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -5,5 +5,5 @@ OpenIDE-Module: org.graalvm.visualvm.core/2
5
5
OpenIDE-Module-Layer: org/graalvm/visualvm/core/boot/layer.xml
6
6
OpenIDE-Module-Localizing-Bundle: org/graalvm/visualvm/core/boot/Bundle.properties
7
7
OpenIDE-Module-Install: org/graalvm/visualvm/core/boot/Install.class
8
- OpenIDE-Module-Specification-Version: 2.0
8
+ OpenIDE-Module-Specification-Version: 2.1
9
9
Original file line number Diff line number Diff line change 42
42
import org .openide .filesystems .FileUtil ;
43
43
import org .openide .loaders .DataFolder ;
44
44
import org .openide .loaders .DataObject ;
45
+ import org .openide .util .actions .Presenter ;
45
46
46
47
/**
47
48
* Class responsible for building explorer context menu.
@@ -100,7 +101,7 @@ JPopupMenu createPopupMenu() {
100
101
if (!actions .isEmpty ()) {
101
102
for (Action action : actions ) {
102
103
if (action == null ) popupMenu .addSeparator ();
103
- else popupMenu .add (new DataSourceItem (action ));
104
+ else popupMenu .add (createItem (action ));
104
105
}
105
106
}
106
107
@@ -217,6 +218,12 @@ private List<Action> cleanupActions(List<Action> actions) {
217
218
}
218
219
219
220
221
+ private static JMenuItem createItem (Action action ) {
222
+ if (action instanceof Presenter .Popup ) return ((Presenter .Popup )action ).getPopupPresenter ();
223
+ else return new DataSourceItem (action );
224
+ }
225
+
226
+
220
227
private static class DataSourceItem extends JMenuItem {
221
228
public DataSourceItem (Action action ) {
222
229
super (action );
You can’t perform that action at this time.
0 commit comments