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: 30541
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);
Previous Topic:[CDO] Has moved from CVS to SVN !!!
Next Topic:Recurring Element Support
Goto Forum:
  


Current Time: Mon Oct 14 19:12:54 GMT 2019

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

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

Back to the top