Community
Participate
Working Groups
I selected a project and opened the properties dialog for it. In the prop dialog, I selected the external builders page. Nothing happened. So I selected another page, and then went back to the external builders page. This time it appeared. I closed the prop dialog. Then I selected another project and invoked Properties. Nothing happened. Here is what I found in my log .. !MESSAGE Unhandled exception caught in event loop. !ENTRY org.eclipse.ui 4 0 Jun 14, 2002 18:30:23.978 !MESSAGE java.lang.NullPointerException !STACK 0 java.lang.NullPointerException at org.eclipse.ui.externaltools.internal.ui.BuilderPropertyPage.updateCommandItem (BuilderPropertyPage.java:395) at org.eclipse.ui.externaltools.internal.ui.BuilderPropertyPage.addCommand (BuilderPropertyPage.java:79) at org.eclipse.ui.externaltools.internal.ui.BuilderPropertyPage.addBuildersToTable (BuilderPropertyPage.java:57) at org.eclipse.ui.externaltools.internal.ui.BuilderPropertyPage.createContents (BuilderPropertyPage.java:203) at org.eclipse.jface.preference.PreferencePage.createControl (PreferencePage.java:201) at org.eclipse.jface.preference.PreferenceDialog.showPage (PreferenceDialog.java:919) at org.eclipse.jface.preference.PreferenceDialog.selectSavedItem (PreferenceDialog.java:609) at org.eclipse.jface.preference.PreferenceDialog.createContents (PreferenceDialog.java:270) at org.eclipse.jface.window.Window.create(Window.java:277) at org.eclipse.ui.dialogs.PropertyDialogAction.run (PropertyDialogAction.java:156) at org.eclipse.jface.action.Action.runWithEvent(Action.java:749) 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.sendEvent(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Menu.setVisible(Menu.java:920) at org.eclipse.swt.widgets.Control.WM_CONTEXTMENU(Control.java:2818) at org.eclipse.swt.widgets.Control.windowProc(Control.java(Compiled Code)) at org.eclipse.swt.widgets.Display.windowProc(Display.java(Compiled Code)) at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method) at org.eclipse.swt.widgets.Tree.callWindowProc(Tree.java(Compiled Code)) at org.eclipse.swt.widgets.Tree.callWindowProc(Tree.java(Compiled Code)) at org.eclipse.swt.widgets.Control.WM_RBUTTONUP(Control.java:3707) at org.eclipse.swt.widgets.Control.windowProc(Control.java(Compiled Code)) at org.eclipse.swt.widgets.Display.windowProc(Display.java(Compiled Code)) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.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:1160) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:248) at org.eclipse.core.launcher.Main.run(Main.java:697) at org.eclipse.core.launcher.Main.main(Main.java:530)
Please investigate whether this should be a candidate for F4. Need value/risk assessment.
Dave, what build are you using? What type of project did you open the properties on? In what view/perspective?
Risk: low Value: high At BuilderPropertyPage line 395, we were calling IPluginRegistry.getExtension (String, String, String), which can potentially return null, but we were not checking for null. The fix is to check for null as shown below. The message which appears hard-coded below if null is returned should be stored in messages.properties for the real fix. // Get the human-readable name of the builder IExtension extension = Platform.getPluginRegistry().getExtension (ResourcesPlugin.PI_RESOURCES, ResourcesPlugin.PT_BUILDERS, builderID); String builderName; if (extension != null) builderName = extension.getLabel(); else builderName = "Could not find builder with id " + builderID; item.setText(builderName); item.setImage(builderImage);
Please use "Missing builder (id={0})" instead.
Ryan did the necessary code changes in BuilderPropertyPage and messages file. Checked by Tod and Simon