Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Getting Invalid Registry Object while uninstalling plugins programatically
Getting Invalid Registry Object while uninstalling plugins programatically [message #1138544] Tue, 15 October 2013 06:45 Go to next message
Anitha Mising name is currently offline Anitha Mising nameFriend
Messages: 28
Registered: February 2010
Junior Member
When a specific condition is hit (while the user is trying to open our perspective), we uninstall the plugins using the below code:

Platform.getBundle(<Bundle name>).uninstall();

When we run this code on Juno 4.2.2, we are hitting the below exception. This same code was working well in Indigo and other earlier releases. Is there a possible step we need to perform before the uninstall? Any help soon will be appreciated.

org.eclipse.core.runtime.InvalidRegistryObjectException: Invalid registry object
at org.eclipse.core.internal.registry.RegistryObjectManager.basicGetObject(RegistryObjectManager.java:273)
at org.eclipse.core.internal.registry.RegistryObjectManager.getObject(RegistryObjectManager.java:263)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.getConfigurationElement(ConfigurationElementHandle.java:26)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.getParent(ConfigurationElementHandle.java:103)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.getDeclaringExtension(ConfigurationElementHandle.java:93)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.getNamespaceIdentifier(ConfigurationElementHandle.java:130)
at org.eclipse.ui.internal.registry.PerspectiveDescriptor.getPluginId(PerspectiveDescriptor.java:153)
at org.eclipse.ui.activities.WorkbenchActivityHelper.createUnifiedId(WorkbenchActivityHelper.java:180)
at org.eclipse.ui.activities.WorkbenchActivityHelper.getIdentifier(WorkbenchActivityHelper.java:57)
at org.eclipse.ui.activities.WorkbenchActivityHelper.allowUseOf(WorkbenchActivityHelper.java:104)
at org.eclipse.ui.activities.WorkbenchActivityHelper.restrictUseOf(WorkbenchActivityHelper.java:122)
at org.eclipse.ui.internal.registry.PerspectiveRegistry.findPerspectiveWithId(PerspectiveRegistry.java:162)
at org.eclipse.ui.internal.registry.PerspectiveRegistry.findPerspectiveWithId(PerspectiveRegistry.java:156)
at org.eclipse.ui.internal.WorkbenchPage.getPerspectiveDesc(WorkbenchPage.java:2385)
at org.eclipse.ui.internal.WorkbenchPage.getPerspective(WorkbenchPage.java:2375)
at org.eclipse.ui.internal.services.WorkbenchSourceProvider.updateActiveShell(WorkbenchSourceProvider.java:952)
at org.eclipse.ui.internal.services.WorkbenchSourceProvider.getCurrentState(WorkbenchSourceProvider.java:133)
at org.eclipse.ui.internal.services.WorkbenchSourceProvider$6.handleEvent(WorkbenchSourceProvider.java:684)
...
Re: Getting Invalid Registry Object while uninstalling plugins programatically [message #1138878 is a reply to message #1138544] Tue, 15 October 2013 11:39 Go to previous messageGo to next message
Thorsten Schlathölter is currently offline Thorsten SchlathölterFriend
Messages: 312
Registered: February 2012
Location: Düsseldorf
Senior Member
Hi Anitha,
from looking at the stack trace I can see/assume the following:

The WorkbenchSourceProvider is updating the active shell. It is therefore requesting the perspectiveDescriptor of the current perspective. If you have already set your perspective (the one you are refering to in your post), then the descriptor is already known to the system. If we assume that this is the case then in the process of the WorkbenchActivityHelper to find out if access to the perspective should be restricted, the Helper is trying to resolve the perspective via the RegistryObjectManager. Since you have uninstalled your bundle with the perspective, it cannot be resolved. In the end this causes the exception:


public class RegistryObjectManager implements IObjectManager {
....
	private Object basicGetObject(int id, byte type) {
		Object result = cache.get(id);
		if (result != null)
			return result;
		if (fromCache)
			result = load(id, type);
/* here your exception is thrown */
		if (result == null)
			throw new InvalidRegistryObjectException();
		cache.put(id, result);
		return result;
	}
...
}


If you have not already done so, try switching to a valid perspective before uninstalling the bundle.

HTH
Thorsten
Re: Getting Invalid Registry Object while uninstalling plugins programatically [message #1139281 is a reply to message #1138544] Tue, 15 October 2013 17:12 Go to previous messageGo to next message
Arun Ganiger is currently offline Arun GanigerFriend
Messages: 2
Registered: October 2013
Junior Member
Hi Thorsten

I am also belong to same team

I tried switching to valid perspective before uninstalling but it did not work for me. I got the same error:Invalid registry object


public void uninstall_Plugins() {
MessageDialog.openInformation(shell, "hhhh",
"some text .");
PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
public void run() {


IWorkbenchWindow w = PlatformUI.getWorkbench().getActiveWorkbenchWindow();

IPerspectiveRegistry reg = PlatformUI.getWorkbench().getPerspectiveRegistry();
String perspId = "org.eclipse.cdt.ui.CPerspective";
w.getActivePage().setPerspective(reg.findPerspectiveWithId(perspId));

try {
// Uninstalling the plugins
if (Platform.getBundle("persective id") != null) {

Platform.getBundle("").uninstall();
}

P
Re: Getting Invalid Registry Object while uninstalling plugins programatically [message #1141687 is a reply to message #1138878] Thu, 17 October 2013 06:14 Go to previous messageGo to next message
Anitha Mising name is currently offline Anitha Mising nameFriend
Messages: 28
Registered: February 2010
Junior Member
Thanks Thorsten for your hint. We tried closing the perspective and it works half way. We did the following to close the perspective before uninstalling the plugins

IWorkbenchWindow w = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
if (w != null) {
IWorkbenchPage wp = w.getActivePage();
if (wp != null) {
IPerspectiveDescriptor[] p = wp.getOpenPerspectives();
if (p != null && p.length > 1) {
wp.closePerspective(p[p.length - 1], true, true);
}
}
}

After this change, we get back to the perspective we were in before we tried to change perspective and plugins got uninstalled. However when i try to bring up the perspective window again to check if the uninstalled perspective is not visible, i hit the Invalid Registry error again. Below is the trace.

org.eclipse.e4.core.di.InjectionException: org.eclipse.core.runtime.InvalidRegistryObjectException: Invalid registry object
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:63)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:231)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:212)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:131)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:171)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:145)
at org.eclipse.e4.ui.workbench.addons.perspectiveswitcher.PerspectiveSwitcher.selectPerspective(PerspectiveSwitcher.java:476)
at org.eclipse.e4.ui.workbench.addons.perspectiveswitcher.PerspectiveSwitcher.access$6(PerspectiveSwitcher.java:472)
at org.eclipse.e4.ui.workbench.addons.perspectiveswitcher.PerspectiveSwitcher$11.widgetSelected(PerspectiveSwitcher.java:368)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
Caused by: org.eclipse.core.runtime.InvalidRegistryObjectException: Invalid registry object
at org.eclipse.core.internal.registry.RegistryObjectManager.basicGetObject(RegistryObjectManager.java:273)
at org.eclipse.core.internal.registry.RegistryObjectManager.getObject(RegistryObjectManager.java:263)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.getConfigurationElement(ConfigurationElementHandle.java:26)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.getParent(ConfigurationElementHandle.java:103)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.getDeclaringExtension(ConfigurationElementHandle.java:93)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.getNamespaceIdentifier(ConfigurationElementHandle.java:130)
at org.eclipse.ui.internal.registry.PerspectiveDescriptor.getPluginId(PerspectiveDescriptor.java:153)
at org.eclipse.ui.activities.WorkbenchActivityHelper.createUnifiedId(WorkbenchActivityHelper.java:180)
at org.eclipse.ui.activities.WorkbenchActivityHelper.getIdentifier(WorkbenchActivityHelper.java:57)
at org.eclipse.ui.activities.WorkbenchActivityHelper.allowUseOf(WorkbenchActivityHelper.java:104)
at org.eclipse.ui.activities.WorkbenchActivityHelper.restrictUseOf(WorkbenchActivityHelper.java:122)
at org.eclipse.ui.activities.WorkbenchActivityHelper.restrictCollection(WorkbenchActivityHelper.java:600)
at org.eclipse.ui.internal.registry.PerspectiveRegistry.getPerspectives(PerspectiveRegistry.java:211)
at org.eclipse.ui.internal.dialogs.PerspContentProvider.getElements(PerspContentProvider.java:42)
at org.eclipse.jface.viewers.StructuredViewer.getRawChildren(StructuredViewer.java:1010)
at org.eclipse.jface.viewers.ColumnViewer.getRawChildren(ColumnViewer.java:703)
at org.eclipse.jface.viewers.AbstractTableViewer.getRawChildren(AbstractTableViewer.java:1087)
at org.eclipse.jface.viewers.StructuredViewer.getFilteredChildren(StructuredViewer.java:917)
at org.eclipse.jface.viewers.StructuredViewer.getSortedChildren(StructuredViewer.java:1067)
at org.eclipse.jface.viewers.AbstractTableViewer.internalRefreshAll(AbstractTableViewer.java:701)
at org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:649)
at org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:636)
at org.eclipse.jface.viewers.AbstractTableViewer$2.run(AbstractTableViewer.java:592)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1443)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1404)
at org.eclipse.jface.viewers.AbstractTableViewer.inputChanged(AbstractTableViewer.java:590)
at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:280)
at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1690)
at org.eclipse.ui.internal.dialogs.SelectPerspectiveDialog.createViewer(SelectPerspectiveDialog.java:198)
at org.eclipse.ui.internal.dialogs.SelectPerspectiveDialog.createDialogArea(SelectPerspectiveDialog.java:134)
at org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java:760)
at org.eclipse.jface.window.Window.create(Window.java:431)
at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
at org.eclipse.jface.window.Window.open(Window.java:790)
at org.eclipse.ui.handlers.ShowPerspectiveHandler.openOther(ShowPerspectiveHandler.java:101)
at org.eclipse.ui.handlers.ShowPerspectiveHandler.execute(ShowPerspectiveHandler.java:57)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:290)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:76)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
... 35 more


I get the following exception when i try to click the finish button to create a new java project.

org.eclipse.core.runtime.InvalidRegistryObjectException: Invalid registry object
at org.eclipse.core.internal.registry.RegistryObjectManager.basicGetObject(RegistryObjectManager.java:273)
at org.eclipse.core.internal.registry.RegistryObjectManager.getObject(RegistryObjectManager.java:263)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.getConfigurationElement(ConfigurationElementHandle.java:26)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.getParent(ConfigurationElementHandle.java:103)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.getDeclaringExtension(ConfigurationElementHandle.java:93)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.getNamespaceIdentifier(ConfigurationElementHandle.java:130)
at org.eclipse.ui.internal.registry.PerspectiveDescriptor.getPluginId(PerspectiveDescriptor.java:153)
at org.eclipse.ui.activities.WorkbenchActivityHelper.createUnifiedId(WorkbenchActivityHelper.java:180)
at org.eclipse.ui.activities.WorkbenchActivityHelper.getIdentifier(WorkbenchActivityHelper.java:57)
at org.eclipse.ui.activities.WorkbenchActivityHelper.allowUseOf(WorkbenchActivityHelper.java:104)
at org.eclipse.ui.activities.WorkbenchActivityHelper.restrictUseOf(WorkbenchActivityHelper.java:122)
at org.eclipse.ui.activities.WorkbenchActivityHelper.restrictCollection(WorkbenchActivityHelper.java:600)
at org.eclipse.ui.internal.registry.PerspectiveRegistry.getPerspectives(PerspectiveRegistry.java:211)
at org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard.addPerspectiveAndDescendants(BasicNewProjectResourceWizard.java:545)
at org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard.updatePerspective(BasicNewProjectResourceWizard.java:487)
at org.eclipse.jdt.internal.ui.wizards.JavaProjectWizard.performFinish(JavaProjectWizard.java:99)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:827)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:432)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.ui.internal.actions.NewWizardShortcutAction.run(NewWizardShortcutAction.java:135)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
Re: Getting Invalid Registry Object while uninstalling plugins programatically [message #1141705 is a reply to message #1139281] Thu, 17 October 2013 06:29 Go to previous messageGo to next message
Thorsten Schlathölter is currently offline Thorsten SchlathölterFriend
Messages: 312
Registered: February 2012
Location: Düsseldorf
Senior Member
Hi Arun,
sorry for answering late. I have now created a little setup to see what is happening in your case. I can confirm that the situation is different when running Indigo or Kepler. I have created an application that consists of two bundles. Each providing a perspective. Two commands with toolbar representations can be used to switch perspective and unregister the bundle. If running Indigo, the toolbar representations of the commands are removed when the respective bundle is uninstalled. It is just as expected. With Kepler this behaviour fails. So in Kepler it is not possible to unregister UI-Components provided by extensions. I dug into the code and found the following in PerspectiveRegistry:

public class PerspectiveRegistry implements IPerspectiveRegistry, IExtensionChangeHandler {

...
	public void removeExtension(IExtension source, Object[] objects) {
		// TODO compat: what do we do about disappearing extensions
	}
...

}


In Indigo you will find code that removes the uninstalled extension at that point. The same is true for other UI-Components. In Kepler I cannot for example find the code that uninstalls the commands. And indeed they also rise exceptions after the providing bundle is uninstalled.
So I think the compatibility feature you are looking for is currently not supported in Kepler.

HTH
Thorsten
Re: Getting Invalid Registry Object while uninstalling plugins programatically [message #1141721 is a reply to message #1139281] Thu, 17 October 2013 06:39 Go to previous messageGo to next message
Thorsten Schlathölter is currently offline Thorsten SchlathölterFriend
Messages: 312
Registered: February 2012
Location: Düsseldorf
Senior Member
Hi Arun,
sorry for answering late. Meanwhile I have created a sample application to see what happens in your case. I can confirm that the situation is different in Indigo and Kepler. The setup consists of two bundles. Each bundle providing a perspective and a view. In addition I have two commands represented by a toolbar button. The buttons can be used to switch perspective and uninstall a bundle. In Indigo the bundle is properly removed including all UI-Components (toolbar buttons and perspective). This is exactly what I would expect. In Kepler this does not hold true. I dug into the code and found the following in Kepler:

public class PerspectiveRegistry implements IPerspectiveRegistry, IExtensionChangeHandler {
...
   public void removeExtension(IExtension source, Object[] objects) {
      // TODO compat: what do we do about disappearing extensions
   }
...
}


In Indigo you find at this place code that removes the perspective from the registry. I also cannot find the code that removes the commands from the Registry in Kepler. So I would say that the uninstall feature of UI-Components provided via extensions is currently (at least partly) not supported by the compatibility layer of Kepler.

HTH
Thorsten

Re: Getting Invalid Registry Object while uninstalling plugins programatically [message #1141736 is a reply to message #1139281] Thu, 17 October 2013 06:49 Go to previous messageGo to next message
Thorsten Schlathölter is currently offline Thorsten SchlathölterFriend
Messages: 312
Registered: February 2012
Location: Düsseldorf
Senior Member
Hi Arun,
sorry for answering late. Meanwhile I have created a test application to see what happens in your example.
I can confirm that the situation is different in Indigo (3.7.2) and Kepler (4.2). My setup constists of two bundles, each providing
a perspective and a view. In addition I have two commands represented by a toolbar button. They can be used to switch
perspective and uninstall a bundle. In Indigo the uninstall process removes the perspective and the toolbar buttons
correctly. There is no exception thrown afterwards. This does not hold true for Kepler. The toolbar buttons are still
visible after uninstalling the providing bundle. I dug into the code and found the following code in PerspectiveRegistry:

public class PerspectiveRegistry implements IPerspectiveRegistry, IExtensionChangeHandler {
...
	public void removeExtension(IExtension source, Object[] objects) {
		// TODO compat: what do we do about disappearing extensions
	}
...
}


So in Kepler the perspective extension is not properly removed from the registry. (In Indigo you will find at this place
code that really removes the extension from the registry.) I can also not find the code that removes the commands from
the registry. So I would conclude that the required compatibility feature that uninstalls UI-Components provided by
extensions is at least partly not provided by Kepler.

HTH
Thorsten
Re: Getting Invalid Registry Object while uninstalling plugins programatically [message #1141767 is a reply to message #1139281] Thu, 17 October 2013 07:11 Go to previous messageGo to next message
Thorsten Schlathölter is currently offline Thorsten SchlathölterFriend
Messages: 312
Registered: February 2012
Location: Düsseldorf
Senior Member
Test (I have already posted my answer 4 times without success)
Re: Getting Invalid Registry Object while uninstalling plugins programatically [message #1142521 is a reply to message #1141767] Thu, 17 October 2013 17:35 Go to previous messageGo to next message
Thorsten Schlathölter is currently offline Thorsten SchlathölterFriend
Messages: 312
Registered: February 2012
Location: Düsseldorf
Senior Member
Meanwhile all my comments show up. If somebody reads this who is able to delete posts, please delete the last 3 posts.
Re: Getting Invalid Registry Object while uninstalling plugins programatically [message #1702542 is a reply to message #1141705] Thu, 23 July 2015 04:57 Go to previous message
Anitha Mising name is currently offline Anitha Mising nameFriend
Messages: 28
Registered: February 2010
Junior Member
Thanks Thorsten for confirming.
Previous Topic:Running Command using handler service from a different Context
Next Topic:How can I refresh text file ?
Goto Forum:
  


Current Time: Sat Apr 20 11:07:26 GMT 2024

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

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

Back to the top