Bug 382243 - [Examples] Incorrect properties of hummingbird20.ecore Application components EReference
Summary: [Examples] Incorrect properties of hummingbird20.ecore Application components...
Status: CLOSED DUPLICATE of bug 392635
Alias: None
Product: Sphinx
Classification: Automotive
Component: Core (show other bugs)
Version: 0.7.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: example
Depends on:
Blocks:
 
Reported: 2012-06-11 10:15 EDT by Jabier Martinez CLA
Modified: 2012-11-14 11:03 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jabier Martinez CLA 2012-06-11 10:15:23 EDT

    
Comment 1 Jabier Martinez CLA 2012-06-11 10:48:03 EDT
When editing a "instanceModel" of the Hummingbird20 example I click on New Child on "Application" and the "Component" option appears twice in the menu.
If we check the "ApplicationItemProvider" of the org.eclipse.sphinx.examples.hummingbird20.edit plugin we could see that it creates a normal child descriptor but then it creates a new child descriptor based on APPLICATION__MIXED

	@Override
	protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
		super.collectNewChildDescriptors(newChildDescriptors, object);

		newChildDescriptors.add
			(createChildParameter
				(InstanceModel20Package.Literals.APPLICATION__COMPONENTS,
				 InstanceModel20Factory.eINSTANCE.createComponent()));

		[adding more newChildDescriptors]

		newChildDescriptors.add
			(createChildParameter
				(InstanceModel20Package.Literals.APPLICATION__MIXED,
				 FeatureMapUtil.createEntry
					(InstanceModel20Package.Literals.APPLICATION__COMPONENTS,
					 InstanceModel20Factory.eINSTANCE.createComponent())));
	}

Once the "Component" is created selecting any of the two options it also appears two children. The "Component" and "<components> Component" but they are the same object and it is serialized as just one element.

To solve this undesired behaviour, I modified the hummingBird20.ecore. I changed the "components" EReference of Application of the instanceModel EPackage.
Derived -> from true to false
Transient -> from true to false
Volatile -> from true to false
I also removed the ExtendedMetaData annotation
After these changes I regenerated the Model Code, Edit Code and Editor Code with the GenModel.
And I got the desired behaviour as the one we have with the "typeModel" "Platform" "Component Type".
Comment 2 Idrissa Dieng CLA 2012-11-14 11:03:40 EST

*** This bug has been marked as a duplicate of bug 392635 ***