Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Copy one subclass instance to another
Copy one subclass instance to another [message #899780] Thu, 02 August 2012 10:42 Go to next message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 853
Registered: July 2009
Senior Member
I have this meta model:

EClass Base
 - a : EString
 - b : EString

EClass AS extends Base

EClass A extends Base


I need to copy an instance of AS to A.
Is there a standard way to do this?
Re: Copy one subclass instance to another [message #899892 is a reply to message #899780] Thu, 02 August 2012 17:24 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 30692
Registered: July 2009
Senior Member
Erdal,

You could create a specialized Copier and specialize the
getTarget(EClass) method so it returns the EClass for A given the EClass
for AS. Of course for this simple case, you could write code against
the the generated interfaces for AS and A...


On 02/08/2012 12:42 PM, Erdal Karaca wrote:
> I have this meta model:
>
> EClass Base
> - a : EString
> - b : EString
>
> EClass AS extends Base
>
> EClass A extends Base
>
> I need to copy an instance of AS to A.
> Is there a standard way to do this?
>
Previous Topic:Why does EAnnoptation initialization code not set the annotation contents ?
Next Topic:Find ItemPropertyDescriptors by EClass instead of concrete instance
Goto Forum:
  


Current Time: Sat Dec 14 20:59:57 GMT 2019

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

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

Back to the top