Skip to main content



      Home
Home » Modeling » EMF » How do I inherit from an EDataType
How do I inherit from an EDataType [message #423189] Wed, 24 September 2008 10:59 Go to next message
Eclipse UserFriend
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 12:09 Go to previous message
Eclipse UserFriend
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
Previous Topic:[Databinding] Generic visualization of EObjects
Next Topic:Initialize multivalued attributes/references
Goto Forum:
  


Current Time: Wed Jul 23 13:58:46 EDT 2025

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

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

Back to the top