Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [QVTo] Use of extended metamodels in transformations
[QVTo] Use of extended metamodels in transformations [message #635686] Wed, 27 October 2010 17:32 Go to next message
Toñi  Reina is currently offline Toñi ReinaFriend
Messages: 209
Registered: July 2009
Senior Member
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 13:46 Go to previous message
Toñi  Reina is currently offline Toñi ReinaFriend
Messages: 209
Registered: July 2009
Senior Member
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
Previous Topic:[ATL] How use UML Primtives Types in Target Model
Next Topic:[ATL] metamodel element direct copy source to target
Goto Forum:
  


Current Time: Tue Sep 24 09:47:23 GMT 2019

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

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

Back to the top