Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 336969 - Meta-model boolean containment value changes are ignored in generated editor
Summary: Meta-model boolean containment value changes are ignored in generated editor
Status: CLOSED DUPLICATE of bug 186455
Alias: None
Product: EMF
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Ed Merks CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-11 11:47 EST by Glenview Jeff CLA
Modified: 2011-02-11 20:53 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 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 ***