|
|
|
|
|
Re: none elements for CrossReferencer-Iterator [message #652425 is a reply to message #652354] |
Thu, 03 February 2011 20:04 |
Ed Merks Messages: 33217 Registered: July 2009 |
Senior Member |
|
|
AJ,
Comments below.
AJ wrote:
> To add to my previous comment.
>
> After saving both resource, if I call EObject container =
> target1.eContainer(); then ELEMENT1 is returned.
>
> And if I called target1.eContainer() again after I have called
> EcoreUtil.delete(element1, true), then container is now null (which is
> good). However, the target is now an orphan in Resource2 (it doesn't
> have a container in Resource1).
Yes, I'd expect that.
>
> My best friend, the debugger, is the one telling me that the target
> was not removed from Resource2 because
> EcoreUtil.handleCrossReference() doesn't find any cross references.
The delete method is documented to behave as you describe. That's why
we go through the effort of computing eObjects/crossResourceEObjects the
way we do.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.04030 seconds