An dangling references isn't going to be an unresolved proxy, it's just an object that's not contained by any resource. Perhaps the easiest would be to use org.eclipse.emf.ecore.xmi.XMLResource.OPTION_PROCESS_DANGLING_HREF as a save option, to discard dangling references rather than throw an exception. Is that okay?
I have an Engineering object, which contains a Quantity attribute.
The Engineering object contains a link to several nodes containing a Weight attribute.
The Quantity field of the Engineering is equal to the sum of the Weight of all linked node.
So with the event management I can detect when the weight changes, and with the bidirectional link, I update the Engineering Quantity attribute.
But when you delete a linked node, I am not able to remove the link from the Engineering and then recalculate the Quantity field of this Engineering.
I need to remove the dangling link, and recalculate the Quantity.
I think I mix a bit the proxies resolution and the dangling links. Can you explain in a few words pls?
Can you explain more the org.eclipse.emf.ecore.xmi.XMLResource.OPTION_PROCESS_DANGLING_HREF parameter?
How it works? how to use it?
In other words, the cross referencer base class is designed with hooks where you can define how the containment tree is navigated, and which cross references to include in the final map where here we essentially just specify the condition that a cross reference is dangling, i.e., it has no containing resource and it isn't a proxy (and perhaps we want to ignore this for transient features because they won't be serialized and so won't cause problems).