|
|
|
|
Re: References not stored in xmi file when I save the objects [message #1780379 is a reply to message #1780369] |
Mon, 22 January 2018 03:25 |
Ed Merks Messages: 33133 Registered: July 2009 |
Senior Member |
|
|
I see what appears to be one cross reference that is serialized, i.e., topographySection="//@groups.6/@data.6" but I don't see that this serialization has 7 groups. Perhaps it's a broken proxy, i.e., you loaded the model, removed some objects from some containment references, but never resolved the cross references to that referenced contained object, nor did you try to clean up all cross references to remove references to the no-longer-contained objects (which in the generated editor is done automatically when an object is deleted from the tree.
In any case, the most likely reason that a cross reference isn't serialized is because the referenced EObject isn't contained by any Resource. Only references to objects contained by a Resource can be serialized. The following code could be used to debug this. I.e., it iterates over each object contained by the resource, iterates over each such contained object's cross references, and checks if the cross referenced object is a proxy or if it's not contained in a resource: for (TreeIterator<EObject> i = resource.getAllContents(); i.hasNext(); )
{
for (EObject eObject : i.next().eCrossReferences())
{
if (eObject.eIsProxy() || eObject.eResource() == null)
{
// This is a) a broken proxy or b) a dangling reference
}
}
}
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Powered by
FUDForum. Page generated in 0.02359 seconds