In an RCP application, we dynamically load plugins and our applicaton can add new plugins.
When we create a new plugin, we then load it with:
newBundle = Activator.getDefault().getBundleContext().installBundle(location);
newBundle.start();
This causes a confirmation dialog appears with the message “Changes to installed plug-ins have affected this perspective. Would you like to reset this perspective to accept these changes?”
Is there any way of getting rid of this dialog so that user intervention is not required here?
I took a brief look at the implementation and it doesn’t look like there is an easy way to ensure that the message doesn’t exist. You can find the implementation by looking at the source code for
org.eclipse.ui.internal.WorkbenchPage.suggestReset().However, there are several things that you may want to try:
org.eclipse.ui.workbenchplugin and overwrite WorkbenchPage with an implementation of yours that implements suggestReset differently.I’d suggest #2 no matter what and then determine whether #1 or #3 is the best way to go until your patch is accepted.