Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » Re: [ATL] Charging models dynamically in an ATL transformation
Re: [ATL] Charging models dynamically in an ATL transformation [message #53104] Wed, 18 July 2007 14:12 Go to next message
Frédéric Jouault is currently offline Frédéric JouaultFriend
Messages: 572
Registered: July 2009
Senior Member
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 #53313 is a reply to message #53104] Thu, 19 July 2007 08:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mefloricel.yahoo.com

Thanks a lot for your answer,

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?

Best regards,

Flori
Re: [ATL] Charging models dynamically in an ATL transformation [message #53408 is a reply to message #53313] Thu, 19 July 2007 10:58 Go to previous message
Frédéric Jouault is currently offline Frédéric JouaultFriend
Messages: 572
Registered: July 2009
Senior Member
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
Previous Topic:[ATL]source code issue
Next Topic:problem with Map data type
Goto Forum:
  


Current Time: Thu Apr 25 21:59:50 GMT 2024

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

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

Back to the top