Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » How to run ATL using a java program?
How to run ATL using a java program? [message #879100] Wed, 30 May 2012 10:09 Go to next message
Kosala Yapa is currently offline Kosala Yapa
Messages: 159
Registered: September 2010
Senior Member
Hi there,

At the moment, I am running ATL program using eclipse Run Configuration, where i specify source.ecore, target.ecore, source.xmi, target.xmi.

Is there any way to run this ATL program using a java program? How to do that?

Thanks in advance !
Kosala
Re: How to run ATL using a java program? [message #879107 is a reply to message #879100] Wed, 30 May 2012 10:23 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 3840
Registered: July 2009
Senior Member
Hi

I'm not an ATL user so I Googled "ATL Java Launch"; I suggest you do the
same.

Regards

Ed Willink

On 30/05/2012 15:09, Kosala Yapa wrote:
> Hi there,
>
> At the moment, I am running ATL program using eclipse Run
> Configuration, where i specify source.ecore, target.ecore, source.xmi,
> target.xmi.
>
> Is there any way to run this ATL program using a java program? How to
> do that?
>
> Thanks in advance !
> Kosala
Re: How to run ATL using a java program? [message #879604 is a reply to message #879107] Thu, 31 May 2012 09:58 Go to previous messageGo to next message
Kosala Yapa is currently offline Kosala Yapa
Messages: 159
Registered: September 2010
Senior Member
Hi there,

It looks to me that org.eclipse.m2m.atl.engine.AtlLauncher class can be used to launch an ATL program.

I am wondering, if someone has experience on it? or example code?

My ATL transformation is:

source meta model (source.ecore)
input is source.xmi

target meta model (target.ecore)
output is target.xmi

Instead of target xmi, i would like to get the output as a java object.

Thanks in advance !
Kosala
Re: How to run ATL using a java program? [message #879966 is a reply to message #879604] Fri, 01 June 2012 03:58 Go to previous messageGo to next message
Kosala Yapa is currently offline Kosala Yapa
Messages: 159
Registered: September 2010
Senior Member
Hi there,

I created ATL plugin. Then Eclipse java export option used and created runnable jar file. I followed instructions provided in http://wiki.eclipse.org/ATL/User_Guide_-_The_ATL_Tools#ATL_Plugins.

still i get an error "Arguments not valid : {IN_model_path, OUT_model_path}", when i run jar.

anyone has a fix for that?

Thanks in advance !
Re: How to run ATL using a java program? [message #881918 is a reply to message #879966] Tue, 05 June 2012 09:51 Go to previous messageGo to next message
Fernanda R.F. is currently offline Fernanda R.F.
Messages: 64
Registered: May 2012
Member
Hi,

I'm getting the same error, "Arguments not valid : {IN_model_path, OUT_model_path}". I'm using the ATL plugin to try to run it with Java.

Anyone knows why it is happening?
Re: How to run ATL using a java program? [message #881922 is a reply to message #881918] Tue, 05 June 2012 09:59 Go to previous messageGo to next message
Kosala Yapa is currently offline Kosala Yapa
Messages: 159
Registered: September 2010
Senior Member
Hi Fernanda,

You need to pass proper input and output files. for example input.xmi and output.xmi

good luck !
Re: How to run ATL using a java program? [message #884039 is a reply to message #881922] Sat, 09 June 2012 20:23 Go to previous messageGo to next message
Fernanda R.F. is currently offline Fernanda R.F.
Messages: 64
Registered: May 2012
Member
Hi! Thanks for your answer.
I did it, I changed run configuration, variables tab, there I put the metamodel in and out name.
However, now I'm getting the following error:

org.eclipse.m2m.atl.core.ATLCoreException: Error loading metamodelIn.ecore: java.io.FileNotFoundException: metamodelIn.ecore (The system cannot find the path specified)
at org.eclipse.m2m.atl.core.emf.EMFInjector.inject(EMFInjector.java:70)
at org.eclipse.m2m.atl.core.emf.EMFInjector.inject(EMFInjector.java:84)
at ........

What I need to do? Or how could I create a java code to run it correctly? is using ATL plugin or creating another code?
Re: How to run ATL using a java program? [message #884699 is a reply to message #884039] Mon, 11 June 2012 12:14 Go to previous message
Fernanda R.F. is currently offline Fernanda R.F.
Messages: 64
Registered: May 2012
Member
So, I found the problem with my properties file.
There is a video in youtube, that help me to solved it, but as I'm new member I can't put the link here, so if you want to see it, search by the following title: Atlas Transformation Language avec JAVA.mp4
It is in French, but is not too hard to understand what he is changing at Eclipse.

Thanks

[Updated on: Mon, 11 June 2012 12:15]

Report message to a moderator

Previous Topic:Transformation Rules
Next Topic:ATL - error getting some fields from UML model
Goto Forum:
  


Current Time: Thu Apr 17 03:36:52 EDT 2014

Powered by FUDForum. Page generated in 0.01829 seconds