Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » How do I inherit from an EDataType
How do I inherit from an EDataType [message #423189] Wed, 24 September 2008 14:59 Go to next message
adotor is currently offline adotorFriend
Messages: 46
Registered: July 2009
Member
Hello,

if I read the ecore-Metamodel right there is currently no
straightforward way to inherit from a EDataType. What do I do if I want
to have an EClass that inherits from an already existing (non-E) class?

Is there a reason why this is prohibited?

Cheers,
Alexander Dotor
Re: How do I inherit from an EDataType [message #423192 is a reply to message #423189] Wed, 24 September 2008 16:09 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
Alexander,

You can use an EClass just like an EDataType in that you can set the
instance class name to some existing Java interface. You can mark the
EClass with isInterface and isAbstract true, so you don't end up with a
generated Impl class that implements that interface. This EClass can
then be used as a super type for your modeled classes.


Alexander Dotor wrote:
> Hello,
>
> if I read the ecore-Metamodel right there is currently no
> straightforward way to inherit from a EDataType. What do I do if I
> want to have an EClass that inherits from an already existing (non-E)
> class?
>
> Is there a reason why this is prohibited?
>
> Cheers,
> Alexander Dotor


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[Databinding] Generic visualization of EObjects
Next Topic:Initialize multivalued attributes/references
Goto Forum:
  


Current Time: Thu Apr 18 22:08:11 GMT 2024

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

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

Back to the top