Skip to main content

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 07:58 Go to next message
Charbel Aoun is currently offline Charbel AounFriend
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 05:37 Go to previous messageGo to next message
noi poi is currently offline noi poiFriend
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

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


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 ( 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.


Stephane Begaudeau, Obeo

Twitter: @sbegaudeau & @acceleo
Google+: stephane.begaudeau & acceleo
Acceleo Documentation:
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 Jul 01 05:57:24 GMT 2022

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

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

Back to the top