Weird editor context menu entry text -> x-repl #4894
-
Since NetBeans 9 with the ability of Java Shell inside JDK 9, there were those actions implemented, but just for mimeType text/x-repl:
Those where added with @EditorActionRegistration as you can see here: https://github.com/apache/netbeans/blob/master/java/jshell.support/src/org/netbeans/modules/jshell/editor/GenerateClassAction.java#L47-L53 and here: https://github.com/apache/netbeans/blob/master/java/jshell.support/src/org/netbeans/modules/jshell/editor/StopExecutionAction.java#L33-L38 Unfortunately it is not working well, I dunno why but the actions are added to each editor under the popupMenu -> text -> x-repl -> Save to Class and popupMenu -> text -> x-repl -> Interrupt execution as you can see (Inisde a Java file, but happens everywhere), this is not correct so I decided to try to fix it. My fix is not about fixing the EditorActionRegistration but to change the actions to the good old ones with ActionRegistration and ActionReferences. Those actions are coming from @sdedic so maybe you have an opinion here and you think that the fix with the EditorActionRegistration is easy, please go ahead, but for me the fix with old action editor and toolbar registration is better than to have this one since years now. What do you think? The problem is in combination with EditorActionRegistration and the property popupPath. For Actions added with menuPath and toolbarPath there is not a problem, just for the popupMenu. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
So my question is, there are 2 options here, which do we want to implement?
|
Beta Was this translation helpful? Give feedback.
-
Also, when I fix those actions with my implementation, there is still an empty context menu entry Removing this will also remove the empty entry. At the end, I dunno what was the intention for this empty layer registration. |
Beta Was this translation helpful? Give feedback.
-
Grep through the codebase for "Editors/Popup". In
And indeed - if you look at the system file system, the registrations for the working files are indeed there: In this screenshot is the path |
Beta Was this translation helpful? Give feedback.
Grep through the codebase for "Editors/Popup". In
platform/editor.mimelookup.impl/arch.xml
I find this:And indeed - if you look at the system file system, the registrations for the working files are indeed there:
In this screenshot is the path
Editors/text/css/Popup
is opened and this matches the Popup menu for CSS files. So my quick diagnostic is, that the paths are just messed up.