Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [acceleo] mtl and emtl, what is the difference?
[acceleo] mtl and emtl, what is the difference? [message #708149] Tue, 02 August 2011 14:06 Go to next message
Leonardo Kenji Shikida is currently offline Leonardo Kenji ShikidaFriend
Messages: 37
Registered: July 2009
Member
acceleo generates a mtl file (model) but my deployed eclipse feature runtime asks for an emtl file.

java.io.IOException: '/br/com/spread/acceleo/presto/main/generate.emtl' not found
at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator.initialize(AbstractAcceleoGenerator.java:409)
at br.com.spread.acceleo.presto.main.Generate.<init>(Generate.java:90)
at br.com.spread.acceleo.presto.ui.common.GenerateAll.doGenerate(GenerateAll.java:90)
at br.com.spread.acceleo.presto.ui.popupMenus.AcceleoGeneratePrestoAction$1.run(AcceleoGeneratePrestoAction.java:76)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

what is the difference? how do I generate an emtl file?

TIA

Kenji
(no subject) [message #708284 is a reply to message #708149] Tue, 02 August 2011 16:14 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 4188
Registered: July 2009
Senior Member
Hi

No. The Acceleo editor enables yoy to maintain the *.mtl file.

The Acceleo builder geneerates a relkated *.java and *.emtl files in
your bin tree.

Check that you have the Acceleo nature for your project and use the
Navigator to inspect your bin tree.

"/br/com" is really wierd. Looks like a typo.

Regards

Ed Willink

On 02/08/2011 15:06, Leonardo Kenji Shikida wrote:
> acceleo generates a mtl file (model) but my deployed eclipse feature
> runtime asks for an emtl file.
>
> java.io.IOException:
> '/br/com/spread/acceleo/presto/main/generate.emtl' not found
> at
> org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator.initialize(AbstractAcceleoGenerator.java:409)
> at br.com.spread.acceleo.presto.main.Generate.<init>(Generate.java:90)
> at
> br.com.spread.acceleo.presto.ui.common.GenerateAll.doGenerate(GenerateAll.java:90)
> at
> br.com.spread.acceleo.presto.ui.popupMenus.AcceleoGeneratePrestoAction$1.run(AcceleoGeneratePrestoAction.java:76)
> at
> org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
>
> what is the difference? how do I generate an emtl file?
>
> TIA
>
> Kenji
Re: (no subject) [message #708317 is a reply to message #708284] Tue, 02 August 2011 17:22 Go to previous messageGo to next message
Leonardo Kenji Shikida is currently offline Leonardo Kenji ShikidaFriend
Messages: 37
Registered: July 2009
Member
I see

so, I suppose my plugin must export these compiled models as well, in order to make it work.

I´ve changed my acceleo project build.properties to include the /bin dir, but still my acceleo ui plugin is not exporting these files (they´re not in the generated jars).

Where do I configure my acceleo ui plugin to export these compiled models? Here is the sequence of steps I am using to export the generator

[1] acceleo project compiles the models into its /bin dir
[2] acceleo ui project plugin references acceleo project
[3] eclipse feature project includes {acceleo ui project, acceleo project, emf model project and generated emf edit and editor projects}
[4] eclipse update site project references eclipse feature project and deploys in a local dir
[5] another eclipse installs the feature via (local) update site

update: so I´ve just copied the emtl files from bin to src and then everything seems to be working now, but I feel a little stupid doing this. Is there anything I can set to make all these compiled models go to where they should in the plugin generation process?

TIA

Kenji

ps. "br" looks like a typo indeed Wink

[Updated on: Tue, 02 August 2011 19:58]

Report message to a moderator

Re: (no subject) [message #709716 is a reply to message #708317] Thu, 04 August 2011 08:15 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1639
Registered: July 2009
Senior Member
Hi Kenji,

The "mtl" file is what you edit when you create an Acceleo module, the "emtl" is the "compiled" form of that file. Kind of what the ".class" is to a ".java". i.e : the Acceleo builder is in charge of creating the emtl file, you should never have to worry about that (and don't have to).

Make sure that :
- You have the Acceleo nature on your project (right-click the project > Properties > "Builders" and in that list, you should see the "Acceleo builder" activated).
- You have the automatic build activated (click the "Project" menu item at the top of the Eclipse window, from there, make sure that "Build automatically" is ticked. If it is not, make sure you always build your project before deploying it (the emtl is present in the "bin" folder))

With these steps, creating an update site for the project *should* export the "emtl" files along the "class" files (if you have some Java code in there, otherwise, only "emtl" files). If it does not, it is a bug :s. We had such a bug with the previous Acceleo version, and I do not remember whether it was fixed for 3.0.0 or one of the subsequent minor releases. The latest release is the 3.1.0; the latest release from the maintenance stream is the 3.0.5. Check the download page for the update site URLs.

Laurent Goubet
Obeo
Previous Topic:[Acceleo 3.1] Problem launching transformation
Next Topic:[Acceleo] JMerge default compiler compliance level
Goto Forum:
  


Current Time: Sat Dec 20 23:50:50 GMT 2014

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

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