Project: Eclipse_Platform_UI
Bug 71053 [ActivityMgmt] IllegalArgException in Capability preference page
Reported: 2004-07-29 04:21:46 | Status: verified fixed

I declare a activity include a catagory and a activity plugin with EMPTY description respectively. And I ran the plugin with a "runtime workbench". Open the windown->perferences->capabilities to change the check state of the activity and category. A dialog jump and say there is a error. And the log stack is belowing: -------- !SESSION Jul 29, 2004 15:48:03.484 --------------------------------------------- eclipse.buildId=unknown java.version=1.4.2_05 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Command-line arguments: -product UserTask.ca.product !ENTRY org.eclipse.core.runtime 4 2 Jul 29, 2004 15:48:03.484 !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.runtime". !STACK 0 java.lang.IllegalArgumentException: Argument cannot be null at org.eclipse.swt.SWT.error(SWT.java:2677) at org.eclipse.swt.SWT.error(SWT.java:2616) at org.eclipse.swt.SWT.error(SWT.java:2587) at org.eclipse.swt.widgets.Widget.error(Widget.java:381) at org.eclipse.swt.widgets.Text.setText(Text.java:1566) at org.eclipse.ui.internal.activities.ws.ActivityEnabler$1.selectionChanged(ActivityEnabler.java:70) at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:159) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:615) at org.eclipse.core.runtime.Platform.run(Platform.java:747) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:157) at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:1394) at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:693) at org.eclipse.jface.viewers.CheckboxTreeViewer.handleSelect(CheckboxTreeViewer.java:253) at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:718) at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:180) at org.eclipse.jface.util.OpenStrategy.access$3(OpenStrategy.java:175) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:324) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2772) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2431) at org.eclipse.jface.window.Window.runEventLoop(Window.java:668) at org.eclipse.jface.window.Window.open(Window.java:648) at org.eclipse.ui.internal.OpenPreferencesAction.run(OpenPreferencesAction.java:72) at org.eclipse.jface.action.Action.runWithEvent(Action.java:881) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:915) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:866) at org.eclipse.jface.action.ActionContributionItem$7.handleEvent(ActionContributionItem.java:785) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2772) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2431) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1377) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:254) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:335) 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(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.core.launcher.Main.basicRun(Main.java:183) at org.eclipse.core.launcher.Main.run(Main.java:644) at org.eclipse.core.launcher.Main.main(Main.java:628) --------------------- So in the class org.eclipse.ui.internal.activities.ws.ActivityEnabler line 70 and 73. xxxxx.getDescription() should be checked whether it is null. if xxxxx.getDescription()!=null setText Thanks Jingan

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/Persistence.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/activities/ActivitiesTestSuite.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/activities/PersistanceTest.java