[QVTo] Use of extended metamodels in transformations [message #635686] |
Wed, 27 October 2010 13:32  |
Eclipse User |
|
|
|
Hi all,
my problem is related to extended metamodels. Let's suppose that I
have defined a metamodel by extending another existing one. When I open
the extended metamodel, the ecore editor shows a structure similar to
the following one:
platform:/resource/extended.ecore
|-- extended (package)
|--- ClassA
containedElements: ClassB (0..*) reference
platform:/resource/base.ecore
|-- base (package)
|--- ClassB
You can also see that ClassA contains 0 or more elements of kind ClassB.
The header of the transformation is the following one:
transformation Source2Extended(in inModel:source, out outModel:
extended);
modeltype source uses 'http://Source.ecore';
modeltype extended uses 'http://Extended.ecore';
that is, the extended metamodel is the output of the transformation.
My problem is that although metamodels are recognized by QVT, I cannot
navigate to ClassB. It seems as if the base package has disappear.
Can anyone give me a hint on how to access to the elements in the base
package?
Thanks in advance,
Toñi
|
|
|
Re: [QVTo] Use of extended metamodels in transformations [message #636296 is a reply to message #635686] |
Sat, 30 October 2010 09:46  |
Eclipse User |
|
|
|
Hi,
I solved the question by adding a modeltype sentence similar to the
following one:
modeltype base uses 'http://base.ecore';
El 27/10/2010 19:32, Toñi Reina Quintero escribió:
> Hi all,
>
>
> my problem is related to extended metamodels. Let's suppose that I have
> defined a metamodel by extending another existing one. When I open the
> extended metamodel, the ecore editor shows a structure similar to the
> following one:
>
>
> platform:/resource/extended.ecore
> |-- extended (package)
> |--- ClassA
> containedElements: ClassB (0..*) reference
> platform:/resource/base.ecore
> |-- base (package)
> |--- ClassB
>
>
>
> You can also see that ClassA contains 0 or more elements of kind ClassB.
>
> The header of the transformation is the following one:
>
> transformation Source2Extended(in inModel:source, out outModel: extended);
> modeltype source uses 'http://Source.ecore';
> modeltype extended uses 'http://Extended.ecore';
>
> that is, the extended metamodel is the output of the transformation.
>
> My problem is that although metamodels are recognized by QVT, I cannot
> navigate to ClassB. It seems as if the base package has disappear.
>
> Can anyone give me a hint on how to access to the elements in the base
> package?
>
> Thanks in advance,
> Toñi
|
|
|
Powered by
FUDForum. Page generated in 0.29765 seconds