Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 330651

Summary: [Profile tab] Exception when an attribute that is not a named element need to be assigned
Product: [Modeling] Papyrus Reporter: Ansgar Radermacher <ansgar.radermacher>
Component: CoreAssignee: Ansgar Radermacher <ansgar.radermacher>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 0.7.1   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Ansgar Radermacher CLA 2010-11-19 06:37:20 EST
There is an exception in the getLabel operation (see trace below), if the available objects are no named elements. The existing code in getLabels has a special treatment for some types (e.g. package import or comment), but not for instance for template signature and template binding. The error is caused by an unchecked assumption that a suitable named element associated with the selection has been assigned.

java.lang.NullPointerException
	at org.eclipse.papyrus.profile.utils.Util.getLabel(Util.java:125)
	at org.eclipse.papyrus.profile.utils.Util.getStringArrayFromList(Util.java:185)
	at org.eclipse.papyrus.profile.tree.objects.MetaclassValueTreeObject.editMe(MetaclassValueTreeObject.java:78)
	at org.eclipse.papyrus.profile.ui.compositesformodel.PropertyComposite.addButtonPressed(PropertyComposite.java:195)
Comment 1 Ansgar Radermacher CLA 2010-11-19 06:39:02 EST
Fixed in 0.7x (plugin org.eclipse.papyrus.profile)
Comment 2 Ansgar Radermacher CLA 2010-11-19 06:39:57 EST
Fixed in 0.7x (plugin org.eclipse.papyrus.profile).