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: 182
Registered: October 2014
Senior Member
Hello

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()
{
clear();
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


Laurent Fasani - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Xcore 100 EClassifier limit?
Next Topic:EclipseCon NA 2015: Call for Papers
Goto Forum:
  


Current Time: Fri Apr 26 02:17:30 GMT 2024

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

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

Back to the top