| Summary: | [plug-in registry] Plugin registry view does not behave well in the case of dynamic changes | ||
|---|---|---|---|
| Product: | [Eclipse Project] PDE | Reporter: | Rafael Chaves <eclipse> |
| Component: | UI | Assignee: | PDE-UI-Inbox <pde-ui-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | caniszczyk, eclipse, jacek.pospychala, mike.haller, patmc, wassim.melhem |
| Version: | 3.1 | ||
| Target Milestone: | 3.5 M3 | ||
| Hardware: | PC | ||
| OS: | All | ||
| Whiteboard: | |||
| Bug Depends on: | 248924 | ||
| Bug Blocks: | |||
|
Description
Rafael Chaves
I got this NPE after uninstalling a plug-in required by others and refreshing. !ENTRY org.eclipse.core.runtime 4 2 2004-12-15 15:32:01.23 !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.runtime". !STACK 0 java.lang.NullPointerException at org.eclipse.pde.internal.runtime.registry.RegistryBrowserContentProvider.getFolderChildren(RegistryBrowserContentProvider.java:208) at org.eclipse.pde.internal.runtime.registry.RegistryBrowserContentProvider.access$0(RegistryBrowserContentProvider.java:192) at org.eclipse.pde.internal.runtime.registry.RegistryBrowserContentProvider$PluginFolder.getChildren(RegistryBrowserContentProvider.java:42) at org.eclipse.pde.internal.runtime.registry.RegistryBrowserContentProvider.getChildren(RegistryBrowserContentProvider.java:129) at org.eclipse.pde.internal.runtime.registry.RegistryBrowserContentProvider.hasChildren(RegistryBrowserContentProvider.java:228) at org.eclipse.jface.viewers.AbstractTreeViewer.isExpandable(AbstractTreeViewer.java:1208) at org.eclipse.ui.part.DrillDownAdapter.canExpand(DrillDownAdapter.java:107) at org.eclipse.ui.part.DrillDownAdapter.canGoInto(DrillDownAdapter.java:142) at org.eclipse.ui.part.DrillDownAdapter.updateNavigationButtons(DrillDownAdapter.java:338) at org.eclipse.ui.part.DrillDownAdapter.selectionChanged(DrillDownAdapter.java:328) at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:163) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1044) at org.eclipse.core.runtime.Platform.run(Platform.java:747) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:161) at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:1667) at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:935) at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:961) at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:209) at org.eclipse.jface.util.OpenStrategy.access$3(OpenStrategy.java:204) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:364) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:833) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2803) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2448) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1569) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1540) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:285) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:144) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:102) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:220) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60) at java.lang.reflect.Method.invoke(Method.java:391) at org.eclipse.core.launcher.Main.basicRun(Main.java:185) at org.eclipse.core.launcher.Main.run(Main.java:710) at org.eclipse.core.launcher.Main.main(Main.java:694) *** Bug 88068 has been marked as a duplicate of this bug. *** Fixed If you uninstall a bundle, e.g. using the console "uninstall" command, the View still shows the bundle and throws Exceptions when user tries to expand the bundle folder in the view.
!ENTRY org.eclipse.jface 4 2 2007-08-31 09:24:31.000
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".
!STACK 0
java.lang.IllegalStateException: Bundle "update@plugins/com.example.ch.settlement.ui_1.0.68.jar" has been uninstalled
at org.eclipse.osgi.framework.internal.core.AbstractBundle.checkValid(AbstractBundle.java:1199)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.getEntry(AbstractBundle.java:1279)
at org.eclipse.pde.internal.runtime.registry.RegistryBrowserLabelProvider.getText(RegistryBrowserLabelProvider.java:177)
at org.eclipse.jface.viewers.StructuredViewer.buildLabel(StructuredViewer.java:2102)
at org.eclipse.jface.viewers.TreeViewer.doUpdateItem(TreeViewer.java:258)
at org.eclipse.jface.viewers.AbstractTreeViewer$UpdateItemSafeRunnable.run(AbstractTreeViewer.java:95)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
The View should handle this appropriately, e.g. do not allow the TreeItem to be expanded.
I'd like to revisit this one. However, instead of removing the uninstalled bundle's children (and disallowing expansion) it would make sense to remove the bundle itself (from the browser tree). Any thoughts? Note: the Registry Browser still needs more work to adapt to all of the possible dynamics - although we are being slightly held back by the (lack of) information provided in IExtensionDelta (see bug 130655) As far as I can tell, stopped bundles aren't displaying properly either... Reopening for now and adding Chris in for discussion. Addressed the most recent issue, but leaving open for the IExtensionDelta bug (see previous comment) Update: Requested APIs have been added, (bug 206936) A stable upgraded RegistryBrowser has been committed although still requires more work (especially to handle the changes made by bug 200570) Unfortunately I do not have time to continue this at the moment. It is in a good state, although more features are required to mark this as complete. Specifically better behaviour in the registry view when extensions/extension points are added/removed. Re-assigning back to inbox. Who ever picks up this bug, feel free to contact me I _may_ be able to give a hand. czesc Janek do you still have any hands to give? ;) after a bit of playing with view, things that need addressing: 1. RegistryBrowserListener should not navigate tree using TreeItem widgets like it happens to do now, but should use model. 2. There are some cache maps in RegistryBrowserContentProvider that make it hard to update model directly. I'll ideally move them to respective nodes. I'll need to work out some reasonable testing tool to simulate all dynamic events that can happen... This should be fixed with new notification mechanism in plug-in registry view implemented in bug 243441. So far I've been testing manually and to some extent with unit tests. Let's wait for bug 248924 to be sure. I think we're good here now. |