Community
Participate
Working Groups
Build Identifier: We'd like to provide the user with a diff view of changes before committing. However, when CDOSetFeatureDeltaImpl is constructed in CDOStoreImpl,set(), it is not passed in the oldValue. I can see that oldValue comes from revision.set(), which needs the delta, so there is a bit of a chicken and an egg problem, however wouldn't it work if the old value for the delta was retrieved from the feature like this? Object originalValue = feature.isMany() ? ((List<?>)eObject.eGet(feature)).get(index) : eObject.eGet(feature); CDOFeatureDelta delta = new CDOSetFeatureDeltaImpl(feature, index, value, originalValue); ... Reproducible: Always
Pascal, I have the feeling that we never serialize the oldValue. Do you think it's generally reasonable that we remember it locally?
Created attachment 188688 [details] patch v1 Yes, the oldValue is never serialized, so I think it doesn't hurt keeping it in the featureDelta in the dirty transaction. The patch puts the oldValue in the CDOSetFeatureDelta, also updates the oldValue for Notfications and probably fixes a notification problem for set operations on lists.
Created attachment 188690 [details] Patch v2 - ready to be committed Just a minor reformat ;-)
Committed revision 7054: - trunk/plugins/org.eclipse.emf.cdo - trunk/plugins/org.eclipse.emf.cdo.common
Committed patch v2
Available in R20110608-1407