Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Dynamically installed bundle and workbench(Dynamically installed bundle and workbench)
Dynamically installed bundle and workbench [message #990524] Wed, 12 December 2012 21:39 Go to next message
Laurent Petit is currently offline Laurent PetitFriend
Messages: 21
Registered: December 2010
Junior Member

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

Re: Dynamically installed bundle and workbench [message #990949 is a reply to message #990524] Sat, 15 December 2012 11:01 Go to previous message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 757
Registered: January 2012
Senior Member

In the migration to Eclipse 4, the code to retrieve and populate the various registries no longer supports dynamic changes. This is a bug.


Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
Previous Topic:Searching for a value in all active contexts?
Next Topic:Difference in children of CTabFolder --> CTabFolder.getChildren()
Goto Forum:

Current Time: Wed Jun 20 21:28:17 GMT 2018

Powered by FUDForum. Page generated in 0.02118 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top