Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Copy an object into an existing one
Copy an object into an existing one [message #904863] Wed, 29 August 2012 09:38 Go to next message
Cedric Moonen is currently offline Cedric MoonenFriend
Messages: 274
Registered: August 2009
Senior Member
Hello,

I'm looking for a feature very similar to ECoreUtil.copy except that I don't want to create a new object, but rather "fill" an existing object.
Does something like that exist?

Thanks,
Cédric
Re: Copy an object into an existing one [message #906014 is a reply to message #904863] Fri, 31 August 2012 13:15 Go to previous message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

Hi, Cédric,

You can extend the EcoreUtil.Copier class to do what you need. Just
seed it with your existing objects as "copies" of the originals, then
ensure that it doesn't create new copies but uses your seeds, instead,
when you tell it to copy your originals.

HTH,

Christian

On 2012-08-29 09:38:36 +0000, Cedric Moonen said:

> Hello,
> I'm looking for a feature very similar to ECoreUtil.copy except that I
> don't want to create a new object, but rather "fill" an existing
> object. Does something like that exist?
>
> Thanks,
> Cédric
Previous Topic:EMF serialization in several files
Next Topic:[Teneo] EMF can't delete opposite reference if SET_PROXY option enabled
Goto Forum:
  


Current Time: Fri Apr 26 09:34:51 GMT 2024

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

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

Back to the top