Bug 295 - Null Pointer Exception entering Body Text (1GFL5O3)
Summary: Null Pointer Exception entering Body Text (1GFL5O3)
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Dejan Glozic CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-10 21:39 EDT by Tod Creasey CLA
Modified: 2001-12-02 14:04 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tod Creasey CLA 2001-10-10 21:39:41 EDT
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:
Comment 1 DJ Houghton CLA 2001-10-24 07:08:02 EDT
PRODUCT VERSION: 125


Comment 2 Dejan Glozic CLA 2001-12-02 14:04:47 EST
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.