Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Removing target objects from cross-referenced resource
Removing target objects from cross-referenced resource [message #653253] Wed, 09 February 2011 02:43 Go to next message
AJ  is currently offline AJ Friend
Messages: 77
Registered: July 2009
Member
The delete method finds all references to the object within the resource set and clean those up. I thought it should be removing references to recursively cross-document contained children as well, but it seems to do only what the Javadoc says; so do I need to explicitly call EcoreUtil.delete() for the children too?

First call:
EcoreUtil.delete(containerElement, true);
Then call:
EcoreUtil.delete(containedTarget, true);
Re: Removing target objects from cross-referenced resource [message #653293 is a reply to message #653253] Wed, 09 February 2011 09:17 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
AJ,

Comments below.


AJ wrote:
> The delete method finds all references to the object within the
> resource set and clean those up. I thought it should be removing
> references to recursively cross-document contained children as well,
> but it seems to do only what the Javadoc says; so do I need to
> explicitly call EcoreUtil.delete() for the children too?
For children contained in another resource, yes.
>
> First call:
> EcoreUtil.delete(containerElement, true);
> Then call:
> EcoreUtil.delete(containedTarget, true);


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[CDO] Has moved from CVS to SVN !!!
Next Topic:Recurring Element Support
Goto Forum:
  


Current Time: Wed Apr 24 19:59:26 GMT 2024

Powered by FUDForum. Page generated in 0.04997 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top