Bug 317 - EC: Error in ExtensionElementPropertySource::getPropertyValue (1GJ6D3T)
Summary: EC: Error in ExtensionElementPropertySource::getPropertyValue (1GJ6D3T)
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:40 EDT by Simon Arsenault CLA
Modified: 2001-12-02 17:09 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 Simon Arsenault CLA 2001-10-10 21:40:02 EDT
This is a posting from the eclipse newsgroup by Birgit Guder
	("DEFECT REPORT: Internal Error when defining an Editors Extension"
	posted on 8/22/2001 6:21 PM)

	Hi,

	I just started using the plugin development tool and wanted to recreate the
	readme-plugin step by step.
	So I created a plugin project and added an Editor Extension. But whenever I
	added a new editor-Element to the Editors-Extension using the Plugin
	Manifest Editor I got an Internal Error.
	The resulting log-file looked like this:

	2 org.eclipse.ui 2 Problems occurred when invoking code from plug-in:
	org.eclipse.ui.
	java.lang.NullPointerException
	 at
	org.eclipse.pde.internal.editor.manifest.ExtensionElementPropertySource.getP
	ropertyValue(ExtensionElementPropertySource.java:222)
	 at
	org.eclipse.ui.views.properties.PropertySheetEntry.refreshValues(PropertyShe
	etEntry.java:484)
	 at
	org.eclipse.ui.views.properties.PropertySheetEntry.refreshChildEntries(Prope
	rtySheetEntry.java:450)
	 at
	org.eclipse.ui.views.properties.PropertySheetEntry.setValues(PropertySheetEn
	try.java:606)
	 at
	org.eclipse.ui.views.properties.PropertySheetViewer.setInput(PropertySheetVi
	ewer.java:700)
	 at
	org.eclipse.ui.views.properties.PropertySheetPage.selectionChanged(PropertyS
	heetPage.java:219)
	....

	After a bit of debugging the IDE itself (which is pretty straight forward by
	the way, good job) I stumbled over the following code snippet in
	ExtensionElementPropertySource.getPropertyValue(Object):
	    ...
	 if (att == null) {
	    if (isEditable() && attInfo != null) {
	      if (attInfo.getKind() == ISchemaAttribute.JAVA) {
	         IPluginModelBase model = att.getModel();  // NullPointerException
	!!
	  .....
	
	Since att is null at this point (explicitly tested) this will cause the
	above NullPointerException.

	The statement should probably look like this:
	        IPluginModelBase model = getElement().getModel();

	This error occurs both in wsw-beta and eclipse build 0.131.

NOTES:
Comment 1 DJ Houghton CLA 2001-10-24 07:08:37 EDT
PRODUCT VERSION:
	0.131

Comment 2 Rodrigo Peretti CLA 2001-11-20 18:50:20 EST
Moving to PDE UI.
Comment 3 Dejan Glozic CLA 2001-12-02 17:09:00 EST
This has been fixed in 1.0