So why having two metamodels for one target model?
May be your target metamodel (to be defined) could inherit from both
WIDGETS and LAYOUTS?
>
> Is it a way to do it ?
>
> Thanks by advance,
>
> Olivier Moises

Thx for your reply.
Unfortunately, the metamodels are already used in other applications and cannot be changed. They are coming from wazaabi project which makes it possible to describe UIs using live EMF models.
I just want to transform EClass into a UI where EAttribute will be transformed into Text fields etc...
I succeeded to make a proof of concept using QVTo and now I would like to make the same operation using ATL.

So why having two metamodels for one target model?
May be your target metamodel (to be defined) could inherit from both
WIDGETS and LAYOUTS?
>
> Is it a way to do it ?
>
> Thanks by advance,
>
> Olivier Moises

If there are no references between those meta-models, then you have to build a fake meta-model with one EClass that will inherit from each meta-model (any EClass). By using this meta-model you can then use elements from the both meta-models.

If one of your meta-model references the other, then you can use this one as meta-model and still use the EClasses from the second one.

Thx for this reply. Actually the situation is slightly trickier than the one I described in my previous post.

The target is defined by a metamodel (SWT) which inherits from a first one (CORE)
In CORE metamodel, in the 'widgets' package, we have an abstract class : AbstractContainer which owns a reference to a layout (an interface defined in 'layouts' package defined in CORE metamodel)
All the concrete implementations are defined in SWT metamodel.

So, we have

CORE
+-widgets
+-layouts

SWT
+-widgets
+-layouts

The SWT!widgets!Composite class inherits from CORE!widgets!AbstractContainer
The SWT!layouts!RowLayout inherits from CORE!layouts!Layout

What do you think about ?

Regards,

Olivier

quote title=Sylvain EVEILLARD wrote on Mon, 12 July 2010 03:59]If there are no references between those meta-models, then you have to build a fake meta-model with one EClass that will inherit from each meta-model (any EClass). By using this meta-model you can then use elements from the both meta-models.

If one of your meta-model references the other, then you can use this one as meta-model and still use the EClasses from the second one.[/quote]