Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] [EMF] undo redo issue with CDOObject modification
[CDO] [EMF] undo redo issue with CDOObject modification [message #1456733] Thu, 30 October 2014 17:12
Laurent Fasani is currently offline Laurent FasaniFriend
Messages: 169
Registered: October 2014
Senior Member

I'm experiencing some issues on execution of several undo/redo of CDOObjects modifications. Here are some scenarios:

scenario 1:
* create an ecore model with class A and B. A contains a list of B.
* use EMF gen model with CDO Native and feature delegation = Reflective
* create an instance A1
* create an instance B1 and B2
* undo, undo + redo redo -> IndexOutOfBoundsException

scenario 2: existing CDO junit test
Otherwise, the junit test Bugzilla_429659_Test in org.eclipse.emf.cdo.tests contains 2 tests which has been disabled(Eike commit)
These two tests are KO.

Actually, this is a regression which comes from the overload of BasicEStoreEList::unset (cf Bug: 296559, Ed commit) in org.eclipse.emf.ecore.EStoreEObjectImpl

I have a fix which is simply add clear(); at the beginning of BasicEStoreEList::unset(), keeping, in this way, the abstract class implementation structure.
public void unset()
if (isUnsettable())
if (isNotificationRequired())
boolean oldIsSet = isSet();
eStore().unset(owner, eStructuralFeature);
dispatchNotification(createNotification(Notification.UNSET, oldIsSet, false));
} else {
eStore().unset(owner, eStructuralFeature);
This fix solve my scenario and also the broken CDO tests in Bugzilla_429659_Test.

Summary :
the fix is in org.eclipse.emf.ecore.EStoreEObjectImpl
the UnitTest is in org.eclipse.emf.cdo.tests. I am not able to find a scenario to do a unit test in emf

So, should I reopen the Bug: 296559 or open a new bug for CDO project.

Thanks to Eike and/or Ed for your feedback

Laurent Fasani - Obeo
Need training or professional services for Sirius?
Previous Topic:Xcore 100 EClassifier limit?
Next Topic:EclipseCon NA 2015: Call for Papers
Goto Forum:

Current Time: Tue Aug 04 15:16:14 GMT 2020

Powered by FUDForum. Page generated in 0.05002 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top