Project: Eclipse_Platform_UI
Bug 13879 Switching working sets can cause NPE in ResourceNavigator
Reported: 2002-04-16 09:27:46 | Status: resolved fixed

I suggest to always keep the filter an set the working set to null (see PackageExplorerPart or JavaBrowsingPart) org.eclipse.swt.SWTException: Widget is disposed at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.SWT.error(SWT.java:1819) at org.eclipse.swt.widgets.Widget.error(Widget.java:368) at org.eclipse.swt.widgets.Control.getDisplay(Control.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.isValidThread(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Tree.setSelection(Tree.java(Compiled Code)) at org.eclipse.jface.viewers.TreeViewer.setSelection(TreeViewer.java:214) at org.eclipse.jface.viewers.AbstractTreeViewer.setSelectionToWidget(AbstractTreeViewer.java(Compiled Code)) at org.eclipse.jface.viewers.StructuredViewer.setSelectionToWidget(StructuredViewer.java(Compiled Code)) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:623) at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:674) at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:636) at org.eclipse.jface.viewers.StructuredViewer.removeFilter(StructuredViewer.java:741) at org.eclipse.ui.views.navigator.ResourceNavigator$2.propertyChange(ResourceNavigator.java:121) at org.eclipse.ui.internal.WorkbenchPage.firePropertyChange(WorkbenchPage.java:965) at org.eclipse.ui.internal.WorkbenchPage.setWorkingSet(WorkbenchPage.java:2018) at org.eclipse.ui.internal.ClearWorkingSetAction.run(ClearWorkingSetAction.java:40) at org.eclipse.jface.action.Action.runWithEvent(Action.java:590) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent(ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java(Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java(Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:819) at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:190) at org.eclipse.core.launcher.Main.run(Main.java:549) at org.eclipse.core.launcher.UIMain.main(UIMain.java:52)

Files changed in fix:
bundles/org.eclipse.ui/Eclipse UI Standard Components/org/eclipse/ui/views/navigator/ResourceNavigator.java