eclipse-modisco / org.eclipse.modisco

Eclipse Public License 2.0
0 stars 0 forks source link

AllInstances: replace in Resource doesn't work #1008

Open eclipse-modisco-bot opened 3 days ago

eclipse-modisco-bot commented 3 days ago

| --- | --- | | Bugzilla Link | 499217 | | Status | NEW | | Importance | P3 normal | | Reported | Aug 05, 2016 05:30 EDT | | Modified | Aug 05, 2016 05:30 EDT | | Version | 0.13.0 | | Reporter | Thomas Cicognani |

Description

final EList contents = this.eObject.eResource().getContents();\ contents.set(index, newEObject);

This code doesn't work in AllInstances process: newEObject is not registered in the cache.

"org.eclipse.modisco.util.emf.core.internal.allinstances.MetaclassInstancesAdapter.handleChanged(Notification)" in case "case Notification.SET:" doesn't treat a object set index event (like the example above).

Temporary workaround: remove the add the EObject.\ contents.remove(index);\ contents.add(index, newEObject);