Re: [ATL] Charging models dynamically in an ATL transformation [message #53104] |
Wed, 18 July 2007 10:12  |
Eclipse User |
|
|
|
Hello,
Please use the M2M newsgroup for ATL-specific questions. I've added it
to the "to" list, so you can continue to use this thread.
> I'm working now on a project in ATL and I need in this project to use a
> metamodel that cannot be specified in the head of the ATL file because
> I know his name only after the transformation begins.
> My question is, in ATL, may I use(charge) models dynamically?
If you use EMF, the actual name of the metamodel does not really need to
be the same as the name you give it in the ATL header and launch config.
Therefore, you may simply call your metamodel MM in the header and load
any metamodel as MM in the launch config.
Regards,
Frédéric Jouault
|
|
|
|
Re: [ATL] Charging models dynamically in an ATL transformation [message #53408 is a reply to message #53313] |
Thu, 19 July 2007 06:58  |
Eclipse User |
|
|
|
Hello,
> The problem is that in my project I do a transformation between UML and
> an other model, TrML. Those two I know them at the beginning.
> But during the transformation I need to use a metamodel that is
> specified in the UML model.
> And I need this metamodel to check some properties during the
> transformation.
> So, I have UML as IN, TrML as OUT, an others metamodels that I discover
> in the UML model during the transformation.
> May I use those metamodels? It exists functions as load() in ATL?
ATL offers a relatively well-controlled environment for transformation
execution. Therefore, I would advise against dynamically loading models.
However, ant scripts can be written to achieve what you want:
- First, query the UML model (using am3.query) to get the information
about the additional model you want to load into a property.
- Then, launch the ATL transformation (using am3.atl) with the
additional model specified using the property initialized by the query
in the previous step.
Information about the ant tasks for ATL can be found on the Eclipse wiki:
http://wiki.eclipse.org/AM3_Ant_Tasks
Regards,
Frédéric Jouault
|
|
|
Powered by
FUDForum. Page generated in 0.28261 seconds