Dynamically unload a UI plugin [message #1794496] |
Fri, 31 August 2018 12:35 |
Priyadharshini K Messages: 4 Registered: January 2014 Location: India |
Junior Member |
|
|
Hello all,
We have developed an Eclipse based IDE and currently we have a feature where we dynamically load/unload the plugins.
When the user open our IDE - we check for a specific configuration. Based on the configuration, we decide if one of our plugin is compatible. If not compatible, we unload this plugin and load another lower version bundle from another location.
Both the plugins contain almost the same UI contributions.
I'm currently running into problems doing this.
1. I am able to figure out the configuration and check for compatibility
2. Call the stop and uninstall of the current bundle - The stop and uninstall both returns success. I use the following APIs from org.osgi.framework.Bundle-
bundle.stop();
bundle.uninstall();
3. Call the Load of the compatible bundle. Here we use the following APIs
installBundle method of org.osgi.framework.BundleContext
start method of org.osgi.framework.Bundle
But the UI of the uninstalled bundle doesn't seem to be removed from the IDE and when we click on the menu item it appears that the functionality is still invoked from the earlier removed plugin.
Could anyone please suggest what is wrong here?
Thanks,
Priya
|
|
|
Powered by
FUDForum. Page generated in 0.03193 seconds