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

Bug 336969

Summary: Meta-model boolean containment value changes are ignored in generated editor
Product: [Modeling] EMF Reporter: Glenview Jeff <junk>
Component: CoreAssignee: Ed Merks <Ed.Merks>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Glenview Jeff CLA 2011-02-11 11:47:37 EST
Build Identifier: M20100909-0800

1. Create a metamodel that has a class with reference to another class where containment = false.
2. Generate all.
3. Change containment to be true
4. Optionally use the "clean generated..." feature to show that even that doesn't fix the problem.  I believe even deleting the meta-class and re-creating it with the same name doesn't fix it.  I think the only workaround is to create the reference with a new name.
5. Generate all.
4. Open the editor and verify that the editor ignores the containment=true and that you cannot right-click to create new objects.


Reproducible: Always

Steps to Reproduce:
1. Create a metamodel that has a class with reference to another class where containment = false.
2. Generate all.
3. Change containment to be true
4. Optionally use the "clean generated..." feature to show that even that doesn't fix the problem.  I believe even deleting the meta-class and re-creating it with the same name doesn't fix it.  I think the only workaround is to create the reference with a new name.
5. Generate all.
4. Open the editor and verify that the editor ignores the containment=true and that you cannot right-click to create new objects.
Comment 1 Ed Merks CLA 2011-02-11 20:53:43 EST
This is working as designed. I.e., the GenModel preserves all settings.  When it's initialized/created, it bases many settings on the state of the model at that time.  I.e., containment references have their GenFeature's Children property set to true.  But under no circumstance is a property changed during reloading.  You have to do that explicitly yourself, i.e., by changing the properties for the GenFeature.

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