Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [MTL] the emtl-file([MTL] the emtl-file)
[MTL] the emtl-file [message #479575] Tue, 11 August 2009 15:40 Go to next message
Siegfried Nolte is currently offline Siegfried NolteFriend
Messages: 48
Registered: August 2009
Member
Can anybody tell me anything about the generate.emtl-file within MTL projects? It is missing now and then. Where does it come from and where is it used for?
Thanks,
Siegfried
Re: [MTL] the emtl-file [message #479709 is a reply to message #479575] Wed, 12 August 2009 07:10 Go to previous messageGo to next message
Siegfried Nolte is currently offline Siegfried NolteFriend
Messages: 48
Registered: August 2009
Member
Well yes, it's the XML-version of the template file. This one is needed as one resource for the generator. But where does it come from and, more interesting, why not, if not?
Siegfried
Re: [MTL] the emtl-file [message #479940 is a reply to message #479709] Thu, 13 August 2009 08:25 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 18
Registered: July 2009
Junior Member
Siegfried wrote :
> Well yes, it's the XML-version of the template file. This one is needed
> as one resource for the generator. But where does it come from and, more
> interesting, why not, if not? Siegfried

Actually this emtl-file seems to be some kind of "compiled" template file.
You need the acceleo compiler in order to generate them : make sure
you're ".project" file contains this builder :

<buildCommand>
<name>org.eclipse.acceleo.ide.ui.acceleoBuilder</name>
<arguments>
</arguments>
</buildCommand>

Cheers,
Guillaume
Re: [MTL] the emtl-file [message #480058 is a reply to message #479940] Thu, 13 August 2009 16:05 Go to previous messageGo to next message
Siegfried Nolte is currently offline Siegfried NolteFriend
Messages: 48
Registered: August 2009
Member
Hi Guillaume,

thanks for help. I indeed don't have this buildCommand within my .project-file:
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Darlehen</name>
<comment></comment><projects></projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments></arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments></arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments></arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.mtl.ide.ui.mtlBuilder</name>
<arguments></arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.mtl.ide.ui.mtlNature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

I can't find that library within my MTL distribution (Eclipse 3.4, EMF 2.4, MTL 0.7.0) as well.

Regards,
Siegfried
Re: [MTL] the emtl-file [message #480065 is a reply to message #480058] Thu, 13 August 2009 16:33 Go to previous messageGo to next message
Siegfried Nolte is currently offline Siegfried NolteFriend
Messages: 48
Registered: August 2009
Member
As far as I found out, I don't need this buildCommand. Sorry Guillaume.
My case is a bit tricky, I've got a workaround now, yet no solution:
First of all let's change to the MTL-perspective (I'm not sure, whether I've worked with it all the time, and I'm not sure whether I need to.)
So editing and saving syntactivally correct mtl-files will deliver a emtl-file somehow. Somehow I happend to get no emtl-file. I don't know why. Maybe the MTL-perspective.
Though this leads to a modification of the tasks/generate.xml (ant-file) as well - a reset to the former values. My editing this file (ECLIPSE_HOME and ECLIPSE_WORKSPACE) has been gone.
That leads to an ant-build error:
>>generate:
[java] java.lang.NoClassDefFoundError: org/eclipse/emf/ecore/resource/ResourceSet>>.
Editing the generate.xml leads to the generate-message of missing emtl. But obviously this is another problem.
Maybe it's a bit more elegant to start this transformation as Java application.
Anyway thanks for help,
Siegfried

[Updated on: Thu, 13 August 2009 16:35]

Report message to a moderator

Re: [MTL] the emtl-file [message #480772 is a reply to message #480065] Tue, 18 August 2009 12:48 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------090902050707000403090608
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Hi Siegfried,

As Guillaume found out, the emtl file is a compiled version of the .mtl
template. This is the file that's used by the engine for the generation,
the .mtl being no more than the source.

It sometime happens for this file to be missing when the java builder
decided to delete everything contained within the "bin" folder; it does
it on a regular basis. You will then need to either force a save of your
mtl file or use Project => clean... => <your mtl project(s)> for the
emtl files to be compiled anew. This has been fixed in the 0.8 version,
which you should obviously use to avoid a fair number of issues.

The absence of the builder most probably comes from your using version
0.7 as well.

Laurent Goubet
Obeo

Siegfried a écrit :
> As far as I found out, I don't need this buildCommand. Sorry Guillaume.
> My case is a bit tricky, I've got a workaround now, yet no solution:
> First of all let's change to the MTL-perspective (I'm not sure, whether
> I've worked with it all the time, and I'm not sure whether I need to.)
> So editing and saving syntactivally correct mtl-files will deliver a
> emtl-file somehow. Somehow I happend to get no emtl-file. I don't know
> why. Maybe the MTL-perspective. Though this leads to a modification of
> the tasks/generate.xml (ant-file) as well - a reset to the former
> values. My editing this file (ECCLIPSE_HOME and ECLIPSE_WORKSPACE) has
> been gone. That leads to a ant-build error:
> generate:
> [java] java.lang.NoClassDefFoundError:
> org/eclipse/emf/ecore/resource/ResourceSet
> Maybe it's a bit more elegant to start this transformation as Java
> application. Anyway thanks for help,
> Siegfried


--------------090902050707000403090608
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyLyI+T2JlbzwvYT4NCmVtYWls O2ludGVybmV0
OmxhdXJlbnQuZ291YmV0QG9iZW8uZnINCnVybDpodHRwOi8vd3d3Lm9iZW8u ZnINCnZlcnNp
b246Mi4xDQplbmQ6dmNhcmQNCg0K
--------------090902050707000403090608--
Re: [MTL] the emtl-file [message #500969 is a reply to message #480772] Mon, 30 November 2009 14:30 Go to previous messageGo to next message
Andre is currently offline AndreFriend
Messages: 29
Registered: November 2009
Location: Brazil
Junior Member
Hi Laurent

I think this problem persists on 0.8 version. Everytime i reopen Eclipse, the .mtl files doesn't compile, accusing error on .emtl file. To solve this, i need to clean the project.

cheers,


Andre Silva
Natal-RN
Brazil
Re: [MTL] the emtl-file [message #501005 is a reply to message #500969] Mon, 30 November 2009 16:24 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------060101040009070205080304
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Andre,

Please don't dig up old threads without leaving at least the last reply
in your answer, reading this through a newsreader, I had no idea what
you were talking about and had to go on the forum to find out :p.

As for your issue, there can be a number of reasons :
a) you told eclipse to clean your workspace at launch, didn't call
"build all" and are not in automatic build
b) you haven't got the Acceleo builder mentionned in your project's
..project file
c) you still have Acceleo 0.7 installed and Eclipse messes up, loading
this instead of the newer 0.8 builds
d) your mtl files are not contained in a source folder
e) you simply are not in automatic build mode

If none of the above is true, we'll need an example on which we can
reproduce this behavior to have a chance at fixing the issue; as we
haven't observed this bug in either one of our projects since the
release of 0.8.

Laurent Goubet
Obeo

Andre wrote:
> Hi Laurent
>
> I think this problem persists on 0.8 version. Everytime i reopen
> Eclipse, the .mtl files doesn't compile, accusing error on .emtl file.
> To solve this, i need to clean the project.
>
> cheers,
>


--------------060101040009070205080304
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------060101040009070205080304--
Re: [MTL] the emtl-file [message #501299 is a reply to message #501005] Tue, 01 December 2009 19:14 Go to previous messageGo to next message
Andre is currently offline AndreFriend
Messages: 29
Registered: November 2009
Location: Brazil
Junior Member
Hi Laurent

Sorry for not leaving the last reply...

Lets go:
- The 'build automatically' option is checked on my workspace
- The acceleo version installed on my PC is: Acceleo (Incubation) 0.8.0.v200906161003 org.eclipse.acceleo.feature.group
- I think the Acceleo Builder is installed, because it is listed on Properties->Buildes and it builds the files after the clean operation. How can i know this for sure?
- My .mtl file is on source folder. When i've created the Acceleo Module Project, the .mtl file was automatically saved on src file, and in fact it is there.
- The Eclipse version installed is:
Domain-Specific Language (DSL) Toolkit
Modeling Amalgamation Project
Version: 1.0.0
Build id: 20090703-0844

The problem is: when i open the workspace, there is no error on .mtl files. When i update and save any mtl, this error appears in all files: 'Metamodel couldnt be resolved'. To solve this, i need to just open a model of the metamodel used on mtl, and then clean the project. All the erros dissapear.
The model i need to open is located on other project, but on the same workspace as the .mtl files. The metamodel is customized, and defined by myself.

thanks,

Andre

Your last reply:
Andre,

Please don't dig up old threads without leaving at least the last reply
in your answer, reading this through a newsreader, I had no idea what
you were talking about and had to go on the forum to find out Razz.

As for your issue, there can be a number of reasons :
a) you told eclipse to clean your workspace at launch, didn't call
"build all" and are not in automatic build
b) you haven't got the Acceleo builder mentionned in your project's
..project file
c) you still have Acceleo 0.7 installed and Eclipse messes up, loading
this instead of the newer 0.8 builds
d) your mtl files are not contained in a source folder
e) you simply are not in automatic build mode

If none of the above is true, we'll need an example on which we can
reproduce this behavior to have a chance at fixing the issue; as we
haven't observed this bug in either one of our projects since the
release of 0.8.

Laurent Goubet
Obeo


Andre Silva
Natal-RN
Brazil
Re: [MTL] the emtl-file [message #501412 is a reply to message #501299] Wed, 02 December 2009 09:00 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------010109050206040909010607
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi Andre,

Acceleo does not handle (yet) usage of workspace-defined metamodels.
This functionality will only see its way in the code for the M5 or M6
release.

It will work after you load a model defined with this metamodel as
loading it will register the needed packages in the package registry.

Laurent Goubet
Obeo

Andre wrote:
> Hi Laurent
>
> Sorry for not leaving the last reply...
>
> Lets go:
> - The 'build automatically' option is checked on my workspace
> - The acceleo version installed on my PC is: Acceleo (Incubation)
> 0.8.0.v200906161003 org.eclipse.acceleo.feature.group
> - I think the Acceleo Builder is installed, because it is listed on
> Properties->Buildes and it builds the files after the clean operation.
> How can i know this for sure?
> - My .mtl file is on source folder. When i've created the Acceleo Module
> Project, the .mtl file was automatically saved on src file, and in fact
> it is there.
> - The Eclipse version installed is: Domain-Specific Language (DSL) Toolkit
> Modeling Amalgamation Project
> Version: 1.0.0
> Build id: 20090703-0844
>
> The problem is: when i open the workspace, there is no error on .mtl
> files. When i update and save any mtl, this error appears in all files:
> 'Metamodel couldnt be resolved'. To solve this, i need to just open a
> model of the metamodel used on mtl, and then clean the project. All the
> erros dissapear.
> The model i need to open is located on other project, but on the same
> workspace as the .mtl files. The metamodel is customized, and defined by
> myself.
>
> thanks,
>
> Andre
>
> Your last reply:
> Andre,
>
> Please don't dig up old threads without leaving at least the last reply
> in your answer, reading this through a newsreader, I had no idea what
> you were talking about and had to go on the forum to find out :p.
>
> As for your issue, there can be a number of reasons :
> a) you told eclipse to clean your workspace at launch, didn't call
> "build all" and are not in automatic build
> b) you haven't got the Acceleo builder mentionned in your project's
> .project file
> c) you still have Acceleo 0.7 installed and Eclipse messes up, loading
> this instead of the newer 0.8 builds
> d) your mtl files are not contained in a source folder
> e) you simply are not in automatic build mode
>
> If none of the above is true, we'll need an example on which we can
> reproduce this behavior to have a chance at fixing the issue; as we
> haven't observed this bug in either one of our projects since the
> release of 0.8.
>
> Laurent Goubet
> Obeo


--------------010109050206040909010607
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------010109050206040909010607--
Re: [MTL] the emtl-file [message #501555 is a reply to message #501412] Wed, 02 December 2009 18:58 Go to previous message
Andre is currently offline AndreFriend
Messages: 29
Registered: November 2009
Location: Brazil
Junior Member
Laurent

thanks for answering one more time..

another problem i've found is: i use a common.mtl file to save my common templates, and some of these templates are not accessable on other .mtl file, even importing the common.mtl. When i paste these templates that are not accessable on the second mtl, everything works fine.

Is there any limitation about saving templates on an .mtl used as import on other files?

These templates manipulate EClasses from my custom metamodel.

thanks


Andre Silva
Natal-RN
Brazil
Previous Topic:[Acceleo] 'If' on an Iterate loop
Next Topic:[XPAND] problem applied stereotypes w EMF 2.6 and UML 3.1
Goto Forum:
  


Current Time: Fri Mar 29 05:43:47 GMT 2024

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

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

Back to the top