Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Generation an XMI file to java file(Generation an XMI file to java file)
Generation an XMI file to java file [message #957413] Thu, 25 October 2012 03:58 Go to next message
Charbel Aoun is currently offline Charbel Aoun
Messages: 7
Registered: October 2012
Junior Member
Hello, I have created a meta-modele using the EMF and i got the file.Ecore then i generated to java files using acceleo 3.0 .
Everything is ok then i created a dynamic instance by right click on the ecore model and i filled data in the attribute and i got the XMI file.
Now i want to generate this XMi file to java file ( .java) as i did it for the ecore extension.
So is it possible to generate from .XMi to .java using acceleo and the mtl files i have????
Please i need this a solution as soon as possible if somebody can help.

Thank you in advance
Re: Generation an XMI file to java file [message #963912 is a reply to message #957413] Tue, 30 October 2012 01:37 Go to previous messageGo to next message
noi poi is currently offline noi poi
Messages: 29
Registered: June 2012
Junior Member
Hey there!

Well i am beginner as well and i want to do the same thing as you .i.e generate java code from xmi.

I am not working with accelo but am using JET . My reserach shows that with JET you can access xmi files and navigate it. Not only that but you can also generate sql, java or xml code with it. e.g

JET has a JSP like syntax and is used to output code

have a look at this in which they have accessed xmi file
http://wiki.eclipse.org/M2T-JET-FAQ/How_do_I_navigate_an_XMI_model_with_JET%3F

Hope it helps
Re: Generation an XMI file to java file [message #964086 is a reply to message #957413] Tue, 30 October 2012 04:46 Go to previous message
Stephane Begaudeau is currently offline Stephane Begaudeau
Messages: 406
Registered: April 2010
Location: Nantes (France)
Senior Member

Hi,

You can use Acceleo to generate any kind of code from your xmi files. I would recommend you to update to Acceleo 3.3.x first by using the Acceleo 3.3.X update site (http://download.eclipse.org/modeling/m2t/acceleo/updates/releases/3.3). If you are looking for examples of an Acceleo generator using a specific meta-model created with Ecore, you can a look here or there.

Regards,

Stephane Begaudeau, Obeo

--
Twitter: @sbegaudeau & @acceleo
Google+: stephane.begaudeau & acceleo
Blog: http://stephanebegaudeau.tumblr.com
Acceleo Documentation: http://docs.obeonetwork.com/acceleo



Previous Topic:[Acceleo] Importing the Acceleo source code as a Maven project
Next Topic:[Acceleo] Path in generated EMTL files differ when in debug or deployed
Goto Forum:
  


Current Time: Fri Apr 18 14:15:04 EDT 2014

Powered by FUDForum. Page generated in 0.02356 seconds