Community
Participate
Working Groups
When you Apply Body Text from the Extensions page you get a null pointer exception STEPS 1) Create an Extension 2) Enter something into the Body Text 3) Hit Apply java.lang.NullPointerException at org.eclipse.pde.internal.editor.manifest.DetailChildrenSection.handleApply(DetailChildrenSection.java:235) at org.eclipse.pde.internal.editor.manifest.DetailChildrenSection.access$5(DetailChildrenSection.java:233) at org.eclipse.pde.internal.editor.manifest.DetailChildrenSection$3.widgetSelected(DetailChildrenSection.java:147) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.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:622) at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:815) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:119) at org.eclipse.core.launcher.Main.run(Main.java:401) at org.eclipse.core.launcher.Main.main(Main.java:274) NOTES:
PRODUCT VERSION: 125
This can happen if an extension is selected. Body text can only be applied to extension elements, not to the 'extension' itself. Because of this, the current element field is set to null. An attempt to 'apply' text to null element results in null pointer exception. The fix is to make text area read-only when selected element is not of the right type and/or is null. When text cannot be entered, 'Apply' button cannot be enabled, thus avoiding the null pointer problem.