Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Generating Java/Caml code from XMI model?(M2T)
Generating Java/Caml code from XMI model? [message #817785] Sat, 10 March 2012 11:50 Go to next message
ting liu is currently offline ting liu
Messages: 1
Registered: March 2012
Junior Member
Hi,

I'm a engineering student doing a project on Java/Caml Code generation from Simulink/Stateflow model .

I'm using the Acceleo bundle 3.* to generate Java/Caml from a file Filter.xmi .

The problem is I learnt how to transform the Ecore/Uml model to Java/Caml code in the tutorials of Acceleo 3 , but I don't find any documentation which trait the XMI file as a input .

I have only a XMI file (Filter.xmi) which stores the Filter model (M0 level , M1 level is a geneauto.ecore )

I wonder whether it is possible to generate files from xmi model ?

Could anyone help me on the tutorial of generation of code from XMI , please ?
Re: Generating Java/Caml code from XMI model? [message #820512 is a reply to message #817785] Wed, 14 March 2012 04:15 Go to previous message
Laurent Goubet is currently offline Laurent Goubet
Messages: 1622
Registered: July 2009
Senior Member
Hi,

As long as your file can be loaded as an EMF model, its extension does not matter, be it ecore, uml, xmi ... XMI is only (one of) the way(s) the model can be serialized on disk.

I suppose you were defining this model from within Eclipse? If not, can you use the right-click > open with > Other > Sample Reflective Ecore Model Editor; it you can see your model in this editor, it can be used "as an EMF model" Smile. If so, you can simply feed it to Acceleo as is. Just replace the "uml" or "ecore" models of the tutorials by your own. If not, you will need to override the "registerPackages" method of the Java class Acceleo automatically generates beside your mtl file and add your "M1" (geneauto.ecore) in the package registrations before feeding your model to Acceleo.

Laurent Goubet
Obeo
Previous Topic:MWE: delay issue with mwe invoked from Eclipse' action
Next Topic:existing acceleo templates for java code generation
Goto Forum:
  


Current Time: Fri Aug 01 20:40:50 EDT 2014

Powered by FUDForum. Page generated in 0.01505 seconds