Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » two (or more) models with a common ancestor
two (or more) models with a common ancestor [message #1078619] Sat, 03 August 2013 08:51 Go to next message
Mauro Condarelli is currently offline Mauro CondarelliFriend
Messages: 424
Registered: September 2009
Senior Member
Hi, I have several (semi) independent models where all my EClasses are
extension of a common ancestor I use for graphic rendering.

Currently this ancestor is duplicated in all models, but that is a
nuisance because I have to adapt my rendering engine and a real PITA
when I have to use multiple models in the same application.

Is there some way to convince EMF to derive its EClasses from an
"external" common ancestor?
Note the ancestor should be part of model itself (i.e.: attributes
contained in it should be part of model), so overriding EClass itself
(if such a thing is at all possible) would not work (I think).

TiA
Mauro
Re: two (or more) models with a common ancestor [message #1078661 is a reply to message #1078619] Sat, 03 August 2013 10:20 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 26287
Registered: July 2009
Senior Member
Mauro,

Comments below.

On 03/08/2013 10:51 AM, Mauro Candarelli wrote:
> Hi, I have several (semi) independent models where all my EClasses are
> extension of a common ancestor I use for graphic rendering.
>
> Currently this ancestor is duplicated in all models, but that is a
> nuisance because I have to adapt my rendering engine and a real PITA
> when I have to use multiple models in the same application.
>
> Is there some way to convince EMF to derive its EClasses from an
> "external" common ancestor?
You can put the reusable EClass it its own model (EPackage) and have all
the other models refer to it in their eSuperTypes...
> Note the ancestor should be part of model itself (i.e.: attributes
> contained in it should be part of model), so overriding EClass itself
> (if such a thing is at all possible) would not work (I think).
>
> TiA
> Mauro
Previous Topic:[Teneo] table_per_class and id generation tips
Next Topic:Drag& drop elements between two models
Goto Forum:
  


Current Time: Sun Dec 21 14:41:47 GMT 2014

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

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