Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315942 - EClass.getEAllContainments does not get refreshed when the containment of a reference is changed.
Summary: EClass.getEAllContainments does not get refreshed when the containment of a r...
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Ed Merks CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-07 05:09 EDT by Markus Herrmannsdoerfer CLA
Modified: 2010-11-05 05:41 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Herrmannsdoerfer CLA 2010-06-07 05:09:05 EDT
When the containment of a reference is changed, the cache behind the method EClass.getEAllContainments does not get refreshed. More specifically, the last assertion of the following minimal test case fails:


EClass eClass = EcoreFactory.eINSTANCE.createEClass();

Assert.assertTrue(eClass.getEAllContainments().isEmpty());

EReference reference = EcoreFactory.eINSTANCE.createEReference();
reference.setContainment(true);
eClass.getEStructuralFeatures().add(reference);

Assert.assertEquals(1, eClass.getEAllContainments().size());

reference.setContainment(false);

Assert.assertTrue(eClass.getEAllContainments().isEmpty());
Comment 1 Ed Merks CLA 2010-09-07 21:56:43 EDT
A fix has been committed to CVS for 2.7.
Comment 2 Ed Merks CLA 2010-11-05 05:41:33 EDT
The fix is available in the latest build for the stream.