Community
Participate
Working Groups
HEAD - have Package Explorer in 'Top Level Elements > Projects' mode - select a Java Project that is not in any working set - open context menu and choose 'Assign Working Set...' - select (check) a working set - click OK !ENTRY org.eclipse.ui 4 0 2009-03-20 15:36:47.660 !MESSAGE Unhandled event loop exception !STACK 0 java.lang.NullPointerException at org.eclipse.jdt.internal.ui.workingsets.ConfigureWorkingSetAssignementAction.getActiveWorkingSets(ConfigureWorkingSetAssignementAction.java:733) at org.eclipse.jdt.internal.ui.workingsets.ConfigureWorkingSetAssignementAction.updateWorkingSets(ConfigureWorkingSetAssignementAction.java:692) at org.eclipse.jdt.internal.ui.workingsets.ConfigureWorkingSetAssignementAction.run(ConfigureWorkingSetAssignementAction.java:634) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:274) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:250) at org.eclipse.jface.action.Action.runWithEvent(Action.java:498) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:586) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:503) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:413) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:87) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2393) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2357) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2209) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:499) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:492) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) 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:368) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) 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:556) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:511) at org.eclipse.equinox.launcher.Main.run(Main.java:1284) at org.eclipse.equinox.launcher.Main.main(Main.java:1260)
Created attachment 129660 [details] Patch with the fix. Added check for model == null before fetching the active working sets.
Comment on attachment 129660 [details] Patch with the fix. Added check for model == null before fetching the active working sets. I don't like the patch as it changes the meaning of 'fWorkingSetModel'.
Created attachment 129681 [details] Fixed. Value of fWorkingSetModel remains unchanged.
The patch is good. Committed to HEAD. Available in builds > N20090323-2000. Personally I would not mix the two styles of testing/setting the variable: either use if (...) both times or use the ternary operator both times.