|Dynamically installed bundle and workbench [message #990524]
||Wed, 12 December 2012 21:39
| Laurent Petit
Registered: December 2010
The following works well in Eclipse 3.X, but does not work in Eclipse 4.X:
- Create a Hello World with a simple Command, menu item, plugin. Export it as a bundled jar.
- Start a fresh Eclipse via ./eclipse -console
- In the OSGi console, install the bundle via install file:///path/to/my-bundle_0.0.1.jar
- Then start it via its bundle id, e.g. start 876
In Eclipse 3.7, I can immediately see workbench additions taken into account, e.g. menu appears, command works from menu, etc.
In Eclipse 4.2, nothing happens in the workbench. No menu entry. I can see from the About > Installed Plugins .. that my-bundle_0.0.1.jar is listed, but AFAIK, not everything is started correctly.
There is also something else that I can note between Eclipse 3 and Eclipse 4 : after having installed a new feature, in Eclipse 3, there was the possibility to "launch the feature in the running Eclipse without restarting", whereas in Eclipse 4 the message just states "you need to restart Eclipse for the changes to take effect".
I have several related questions :
- Why does my plugin workbench contributions (menu, etc.) not appear in 4.2 when it just worked in 3.7? Is because the command framework, etc., is not the way to do things in 4.2 and that the compatibility layer does not offer as much dynamism as if the plugin starts in 3.7 ?
- If so, is there a chance that further compatibility layers released with further 4.x versions will improve this ? I'm asking, because I'm not ready yet to stop support for Eclipse 3.X, and also not ready to have 2 codebases to maintain.
For the record, what I'm trying to achieve is a very dynamic experience for adding contributions such as creating new commands, new menus, new menu entries, new Views, etc. from a clojure interactive console directly connected to the running Eclipse JVM.
For instance, what's working in Eclipse 3 and not working in Eclipse 4 is the possibility for a user to define keybindings for a dynamically created command: in Eclipse 4, it seems that when a command is dynamically created and then defined via the ICommandService ( .getCommand() then .define() ), it is still not available in the EMF Application model, upon which IBindingService.savePreferences() transitively relies (meaning neither the user via the GUI, neither programmatically, can register keybindings ; and I fear I'm here just scratching the surface of differences between 3.X and 4.X in terms of dynamic behaviour ?)
Thanks in advance for your answers,
[Updated on: Wed, 12 December 2012 22:50]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.02616 seconds