Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » How to add a Super type to a Eclass programmatically?(Dynamic EMF)
How to add a Super type to a Eclass programmatically? [message #825911] Wed, 21 March 2012 12:12 Go to next message
Rui Domingues is currently offline Rui DominguesFriend
Messages: 194
Registered: October 2010
Senior Member
Hi everyone.

Can anyone tell me how do I add a Esuper type to a Eclass programmatically?

I tried
c.getEAllSuperTypes().add(..) but obviously It went into a NotSupported exception.


I'm updatting an huge Ecore programmatically, and I need a portion of my EClasses inheriting from another EClass.


Thanks in advance.
Re: How to add a Super type to a Eclass programmatically? [message #825922 is a reply to message #825911] Wed, 21 March 2012 12:25 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 21.03.2012 13:12, schrieb Rui Domingues:
> Hi everyone.
>
> Can anyone tell me how do I add a Esuper type to a Eclass programmatically?
>
> I tried c.getEAllSuperTypes().add(..) but obviously It went into a NotSupported exception.
The stack trace could help.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: How to add a Super type to a Eclass programmatically? [message #825923 is a reply to message #825911] Wed, 21 March 2012 12:26 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Rui,

That's a derived feature. You need to modify c.getESuperTypes(). Note
that all the getEAll* feature are derived...


On 21/03/2012 1:12 PM, Rui Domingues wrote:
> Hi everyone.
>
> Can anyone tell me how do I add a Esuper type to a Eclass
> programmatically?
>
> I tried c.getEAllSuperTypes().add(..) but obviously It went into a
> NotSupported exception.
>
>
> I'm updatting an huge Ecore programmatically, and I need a portion of
> my EClasses inheriting from another EClass.
>
>
> Thanks in advance.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How to add a Super type to a Eclass programmatically? [message #826013 is a reply to message #825923] Wed, 21 March 2012 14:41 Go to previous message
Rui Domingues is currently offline Rui DominguesFriend
Messages: 194
Registered: October 2010
Senior Member
Thanks Ed.

Of course, you're right.

Rui
Previous Topic:Bind CTRL+C to CopyAction
Next Topic:ClassCastException on XMI import/export
Goto Forum:
  


Current Time: Fri Apr 26 18:08:50 GMT 2024

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

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

Back to the top