Community
Participate
Working Groups
In CDONotificationBuilder#visit(CDOContainerFeatureDelta), line 254 : http://git.eclipse.org/c/cdo/cdo.git/tree/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/object/CDONotificationBuilder.java#n254 The feature parameter seems wrong : EcorePackage.eINSTANCE.eContainmentFeature() returns null. The notification with a null feature doesn't get to adapters which needs to react to changes on an object's container (using a container EReference). I think a fix should be something like : add(new CDODeltaNotificationImpl(object, Notification.SET, object.eClass().getEStructuralFeature(object.eContainerFeatureID()), oldValue, delta.getContainerID())); Steps to reproduce : 1) Get a CDO ecore model which defines an EClass with a container EReference. 2) Override generated code to add an adapter in the constructor of the EClass implementation : eAdapters().add(new AdapterImpl() { @Override public void notifyChanged(Notification msg) { System.err.println("## " + msg.getFeature()); System.err.println("--- " + msg.getOldValue()); System.err.println("+++ " + msg.getNewValue()); } }); 3) Activate cdo load notifications using : cdoView.options().setLoadNotificationEnabled(true); 4) Load an object (of the right EClass) from the CDO repository. For instance : cdoView.getObject(myObjectId) The notification of the container feature does not get to the adapter. If you debug, you'll see the notification in the notification chain, but with an associated "null" feature. I can't find any easy workaround for this issue. Please let me know if you have one.
Created attachment 269802 [details] Junit test case Thanks to Jean-Francois Brazeau (in bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=517168), I could easily re-use his code to create a JUnit test that reproduce the problem. There's a little mistake in the original description : the notification is properly dispatched to the adapters, but it has a null EStructuralFeature (instead of the container feature).
Moving all open bugs to 4.7
Moving all unresolved issues to version 4.8-
Moving all unresolved issues to version 4.9
Moving to 4.13.