Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Acceleo UI plugin doesn't generate anything(Project works on runtime, but doesn't do anything when exported.)
Acceleo UI plugin doesn't generate anything [message #1736612] Thu, 30 June 2016 14:59 Go to next message
Zuriel Morales is currently offline Zuriel MoralesFriend
Messages: 12
Registered: March 2016
Junior Member
I have an Acceleo UI project and a template for web code generation.

The UI project works fine when I do the "Run As > Eclipse Application" thing.

I exported it as a plugin and installed it on Eclipse, but it refuses to work. All it does is create the folder that would contain the generated files, but said folder turns out empty.

I have no idea what's going on. I also have a GMF editor that works just fine both as a plugin and on the Eclipse runtime without any additional tweaking, so this problem with the UI has me stumped.

Any help on this matter would be greatly appreciated. I'm working on Eclipse Mars with the latest version of Acceleo.
Re: Acceleo UI plugin doesn't generate anything [message #1736704 is a reply to message #1736612] Fri, 01 July 2016 09:13 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
Hi,

please open the error log (Window > show view > error log) and tell us if there is anything that's logged when you start your generation.

Laurent Goubet
Obeo
Re: Acceleo UI plugin doesn't generate anything [message #1736762 is a reply to message #1736704] Fri, 01 July 2016 14:50 Go to previous messageGo to next message
Zuriel Morales is currently offline Zuriel MoralesFriend
Messages: 12
Registered: March 2016
Junior Member
Hi Laurent, thanks for replying!

I see now that the UI project can't find the template. It says:

eclipse.buildId=4.6.0.I20160525-2000
java.version=1.8.0_91
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=es_MX
Framework arguments: -product org.eclipse.epp.package.modeling.product -product org.eclipse.epp.package.modeling.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.modeling.product -data file:/C:/Users/117875/workspace/ -product org.eclipse.epp.package.modeling.product

M2WebMakerM2T.ui
Error
Fri Jul 01 08:40:57 MDT 2016
'/M2WebMakerM2T/main/generate.emtl' not found

java.io.IOException: '/M2WebMakerM2T/main/generate.emtl' not found
at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator.initialize(AbstractAcceleoGenerator.java:481)
at M2WebMakerM2T.main.Generate.<init>(Generate.java:90)
at M2WebMakerM2T.ui.common.GenerateAll.doGenerate(GenerateAll.java:90)
at M2WebMakerM2T.ui.popupMenus.AcceleoGenerateCodeAction$1.run(AcceleoGenerateCodeAction.java:76)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)

Could it be that it looks for "generate.emtl" while the template name is actually "generate.mtl"? I'm gonna try to rename it.
Re: Acceleo UI plugin doesn't generate anything [message #1736782 is a reply to message #1736762] Fri, 01 July 2016 16:39 Go to previous messageGo to next message
Zuriel Morales is currently offline Zuriel MoralesFriend
Messages: 12
Registered: March 2016
Junior Member
Renaming did not solve the problem, unfortunately :/ What else could it be?

[Updated on: Fri, 01 July 2016 19:20]

Report message to a moderator

Re: Acceleo UI plugin doesn't generate anything [message #1736803 is a reply to message #1736782] Fri, 01 July 2016 21:43 Go to previous messageGo to next message
Zuriel Morales is currently offline Zuriel MoralesFriend
Messages: 12
Registered: March 2016
Junior Member
These errors pop up in the log when building the plugin from the Update Site project:

!ENTRY org.eclipse.pde.build 4 17 2016-07-01 15:41:29.072
!MESSAGE Could not create feature: file:C:/Eclipse E/eclipse/features/org.eclipse.epp.package.modeling.feature_4.6.0.20160601-1520/feature.xml.
!STACK 1
org.eclipse.core.runtime.CoreException: Problems parsing the feature file:C:/Eclipse E/eclipse/features/org.eclipse.epp.package.modeling.feature_4.6.0.20160601-1520/feature.xml.
at org.eclipse.pde.internal.build.site.BuildTimeFeatureFactory.parseBuildFeature(BuildTimeFeatureFactory.java:85)
at org.eclipse.pde.internal.build.site.BuildTimeFeatureFactory.createFeature(BuildTimeFeatureFactory.java:50)
at org.eclipse.pde.internal.build.site.BuildTimeSite.createFeature(BuildTimeSite.java:458)
at org.eclipse.pde.internal.build.site.compatibility.FeatureReference.getFeature(FeatureReference.java:39)
at org.eclipse.pde.internal.build.site.BuildTimeSite.resolveFeatureReferences(BuildTimeSite.java:316)
at org.eclipse.pde.internal.build.site.BuildTimeSite.findFeature(BuildTimeSite.java:285)
at org.eclipse.pde.internal.build.site.BuildTimeSite.findFeature(BuildTimeSite.java:277)
at org.eclipse.pde.internal.build.BuildScriptGenerator.generateFeatures(BuildScriptGenerator.java:249)
at org.eclipse.pde.internal.build.BuildScriptGenerator.generate(BuildScriptGenerator.java:127)
at org.eclipse.pde.internal.core.exports.FeatureExportOperation.doExport(FeatureExportOperation.java:255)
at org.eclipse.pde.internal.core.exports.FeatureBasedExportOperation.run(FeatureBasedExportOperation.java:51)
at org.eclipse.pde.internal.core.exports.SiteBuildOperation.run(SiteBuildOperation.java:66)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Contains: Error parsing feature: "require" must include at least one "import" element.
!SUBENTRY 1 org.eclipse.equinox.p2.publisher.eclipse 4 17 2016-07-01 15:41:29.073
!MESSAGE Problems parsing the feature file:C:/Eclipse E/eclipse/features/org.eclipse.epp.package.modeling.feature_4.6.0.20160601-1520/feature.xml.
!SUBENTRY 2 org.eclipse.equinox.p2.publisher.eclipse 4 17 2016-07-01 15:41:29.073
!MESSAGE Error parsing feature: "require" must include at least one "import" element.

!ENTRY org.eclipse.pde.build 4 1 2016-07-01 15:41:29.151
!MESSAGE Problems parsing the feature file:C:/Eclipse E/eclipse/features/org.eclipse.epp.package.modeling.feature_4.6.0.20160601-1520/feature.xml.
!STACK 1
org.eclipse.core.runtime.CoreException: Problems parsing the feature file:C:/Eclipse E/eclipse/features/org.eclipse.epp.package.modeling.feature_4.6.0.20160601-1520/feature.xml.
at org.eclipse.pde.internal.build.site.BuildTimeFeatureFactory.parseBuildFeature(BuildTimeFeatureFactory.java:85)
at org.eclipse.pde.internal.build.site.BuildTimeFeatureFactory.createFeature(BuildTimeFeatureFactory.java:50)
at org.eclipse.pde.internal.build.site.BuildTimeSite.createFeature(BuildTimeSite.java:458)
at org.eclipse.pde.internal.build.site.compatibility.FeatureReference.getFeature(FeatureReference.java:39)
at org.eclipse.pde.internal.build.site.BuildTimeSite.resolveFeatureReferences(BuildTimeSite.java:316)
at org.eclipse.pde.internal.build.site.BuildTimeSite.findFeature(BuildTimeSite.java:285)
at org.eclipse.pde.internal.build.site.BuildTimeSite.findFeature(BuildTimeSite.java:277)
at org.eclipse.pde.internal.build.BuildScriptGenerator.generateFeatures(BuildScriptGenerator.java:249)
at org.eclipse.pde.internal.build.BuildScriptGenerator.generate(BuildScriptGenerator.java:127)
at org.eclipse.pde.internal.core.exports.FeatureExportOperation.doExport(FeatureExportOperation.java:255)
at org.eclipse.pde.internal.core.exports.FeatureBasedExportOperation.run(FeatureBasedExportOperation.java:51)
at org.eclipse.pde.internal.core.exports.SiteBuildOperation.run(SiteBuildOperation.java:66)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Contains: Error parsing feature: "require" must include at least one "import" element.
!SUBENTRY 1 org.eclipse.equinox.p2.publisher.eclipse 4 17 2016-07-01 15:41:29.151
!MESSAGE Problems parsing the feature file:C:/Eclipse E/eclipse/features/org.eclipse.epp.package.modeling.feature_4.6.0.20160601-1520/feature.xml.
!SUBENTRY 2 org.eclipse.equinox.p2.publisher.eclipse 4 17 2016-07-01 15:41:29.151
!MESSAGE Error parsing feature: "require" must include at least one "import" element.
Re: Acceleo UI plugin doesn't generate anything [message #1736813 is a reply to message #1736803] Sat, 02 July 2016 08:03 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Using spaces in file names is a well known way to provoke many latent
bugs. It looks like you have uncovered one in the update site creation.

Much easier to just void spaces and other troublesome characters.

Regards

Ed Willink


On 01/07/2016 22:43, Zuriel Morales wrote:
> These errors pop up in the log when building the plugin from the
> Update Site project:
>
> !ENTRY org.eclipse.pde.build 4 17 2016-07-01 15:41:29.072
> !MESSAGE Could not create feature: file:C:/Eclipse
> E/eclipse/features/org.eclipse.epp.package.modeling.feature_4.6.0.20160601-1520/feature.xml.
> !STACK 1
> org.eclipse.core.runtime.CoreException: Problems parsing the feature
> file:C:/Eclipse
> E/eclipse/features/org.eclipse.epp.package.modeling.feature_4.6.0.20160601-1520/feature.xml.
> at
> org.eclipse.pde.internal.build.site.BuildTimeFeatureFactory.parseBuildFeature(BuildTimeFeatureFactory.java:85)
> at
> org.eclipse.pde.internal.build.site.BuildTimeFeatureFactory.createFeature(BuildTimeFeatureFactory.java:50)
> at
> org.eclipse.pde.internal.build.site.BuildTimeSite.createFeature(BuildTimeSite.java:458)
> at
> org.eclipse.pde.internal.build.site.compatibility.FeatureReference.getFeature(FeatureReference.java:39)
> at
> org.eclipse.pde.internal.build.site.BuildTimeSite.resolveFeatureReferences(BuildTimeSite.java:316)
> at
> org.eclipse.pde.internal.build.site.BuildTimeSite.findFeature(BuildTimeSite.java:285)
> at
> org.eclipse.pde.internal.build.site.BuildTimeSite.findFeature(BuildTimeSite.java:277)
> at
> org.eclipse.pde.internal.build.BuildScriptGenerator.generateFeatures(BuildScriptGenerator.java:249)
> at
> org.eclipse.pde.internal.build.BuildScriptGenerator.generate(BuildScriptGenerator.java:127)
> at
> org.eclipse.pde.internal.core.exports.FeatureExportOperation.doExport(FeatureExportOperation.java:255)
> at
> org.eclipse.pde.internal.core.exports.FeatureBasedExportOperation.run(FeatureBasedExportOperation.java:51)
> at
> org.eclipse.pde.internal.core.exports.SiteBuildOperation.run(SiteBuildOperation.java:66)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
> Contains: Error parsing feature: "require" must include at least one
> "import" element.
> !SUBENTRY 1 org.eclipse.equinox.p2.publisher.eclipse 4 17 2016-07-01
> 15:41:29.073
> !MESSAGE Problems parsing the feature file:C:/Eclipse
> E/eclipse/features/org.eclipse.epp.package.modeling.feature_4.6.0.20160601-1520/feature.xml.
> !SUBENTRY 2 org.eclipse.equinox.p2.publisher.eclipse 4 17 2016-07-01
> 15:41:29.073
> !MESSAGE Error parsing feature: "require" must include at least one
> "import" element.
>
> !ENTRY org.eclipse.pde.build 4 1 2016-07-01 15:41:29.151
> !MESSAGE Problems parsing the feature file:C:/Eclipse
> E/eclipse/features/org.eclipse.epp.package.modeling.feature_4.6.0.20160601-1520/feature.xml.
> !STACK 1
> org.eclipse.core.runtime.CoreException: Problems parsing the feature
> file:C:/Eclipse
> E/eclipse/features/org.eclipse.epp.package.modeling.feature_4.6.0.20160601-1520/feature.xml.
> at
> org.eclipse.pde.internal.build.site.BuildTimeFeatureFactory.parseBuildFeature(BuildTimeFeatureFactory.java:85)
> at
> org.eclipse.pde.internal.build.site.BuildTimeFeatureFactory.createFeature(BuildTimeFeatureFactory.java:50)
> at
> org.eclipse.pde.internal.build.site.BuildTimeSite.createFeature(BuildTimeSite.java:458)
> at
> org.eclipse.pde.internal.build.site.compatibility.FeatureReference.getFeature(FeatureReference.java:39)
> at
> org.eclipse.pde.internal.build.site.BuildTimeSite.resolveFeatureReferences(BuildTimeSite.java:316)
> at
> org.eclipse.pde.internal.build.site.BuildTimeSite.findFeature(BuildTimeSite.java:285)
> at
> org.eclipse.pde.internal.build.site.BuildTimeSite.findFeature(BuildTimeSite.java:277)
> at
> org.eclipse.pde.internal.build.BuildScriptGenerator.generateFeatures(BuildScriptGenerator.java:249)
> at
> org.eclipse.pde.internal.build.BuildScriptGenerator.generate(BuildScriptGenerator.java:127)
> at
> org.eclipse.pde.internal.core.exports.FeatureExportOperation.doExport(FeatureExportOperation.java:255)
> at
> org.eclipse.pde.internal.core.exports.FeatureBasedExportOperation.run(FeatureBasedExportOperation.java:51)
> at
> org.eclipse.pde.internal.core.exports.SiteBuildOperation.run(SiteBuildOperation.java:66)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
> Contains: Error parsing feature: "require" must include at least one
> "import" element.
> !SUBENTRY 1 org.eclipse.equinox.p2.publisher.eclipse 4 17 2016-07-01
> 15:41:29.151
> !MESSAGE Problems parsing the feature file:C:/Eclipse
> E/eclipse/features/org.eclipse.epp.package.modeling.feature_4.6.0.20160601-1520/feature.xml.
> !SUBENTRY 2 org.eclipse.equinox.p2.publisher.eclipse 4 17 2016-07-01
> 15:41:29.151
> !MESSAGE Error parsing feature: "require" must include at least one
> "import" element.
>
Re: Acceleo UI plugin doesn't generate anything [message #1736830 is a reply to message #1736813] Sat, 02 July 2016 13:32 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
It looks to me more like a problem that the feature.xml is not well
formed according to the schema.


On 02.07.2016 04:03, Ed Willink wrote:
> Hi
>
> Using spaces in file names is a well known way to provoke many latent
> bugs. It looks like you have uncovered one in the update site creation.
>
> Much easier to just void spaces and other troublesome characters.
>
> Regards
>
> Ed Willink
>
>
> On 01/07/2016 22:43, Zuriel Morales wrote:
>> These errors pop up in the log when building the plugin from the
>> Update Site project:
>>
>> !ENTRY org.eclipse.pde.build 4 17 2016-07-01 15:41:29.072
>> !MESSAGE Could not create feature: file:C:/Eclipse
>> E/eclipse/features/org.eclipse.epp.package.modeling.feature_4.6.0.20160601-1520/feature.xml.
>> !STACK 1
>> org.eclipse.core.runtime.CoreException: Problems parsing the feature
>> file:C:/Eclipse
>> E/eclipse/features/org.eclipse.epp.package.modeling.feature_4.6.0.20160601-1520/feature.xml.
>> at
>> org.eclipse.pde.internal.build.site.BuildTimeFeatureFactory.parseBuildFeature(BuildTimeFeatureFactory.java:85)
>> at
>> org.eclipse.pde.internal.build.site.BuildTimeFeatureFactory.createFeature(BuildTimeFeatureFactory.java:50)
>> at
>> org.eclipse.pde.internal.build.site.BuildTimeSite.createFeature(BuildTimeSite.java:458)
>> at
>> org.eclipse.pde.internal.build.site.compatibility.FeatureReference.getFeature(FeatureReference.java:39)
>> at
>> org.eclipse.pde.internal.build.site.BuildTimeSite.resolveFeatureReferences(BuildTimeSite.java:316)
>> at
>> org.eclipse.pde.internal.build.site.BuildTimeSite.findFeature(BuildTimeSite.java:285)
>> at
>> org.eclipse.pde.internal.build.site.BuildTimeSite.findFeature(BuildTimeSite.java:277)
>> at
>> org.eclipse.pde.internal.build.BuildScriptGenerator.generateFeatures(BuildScriptGenerator.java:249)
>> at
>> org.eclipse.pde.internal.build.BuildScriptGenerator.generate(BuildScriptGenerator.java:127)
>> at
>> org.eclipse.pde.internal.core.exports.FeatureExportOperation.doExport(FeatureExportOperation.java:255)
>> at
>> org.eclipse.pde.internal.core.exports.FeatureBasedExportOperation.run(FeatureBasedExportOperation.java:51)
>> at
>> org.eclipse.pde.internal.core.exports.SiteBuildOperation.run(SiteBuildOperation.java:66)
>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>> Contains: Error parsing feature: "require" must include at least one
>> "import" element.
>> !SUBENTRY 1 org.eclipse.equinox.p2.publisher.eclipse 4 17 2016-07-01
>> 15:41:29.073
>> !MESSAGE Problems parsing the feature file:C:/Eclipse
>> E/eclipse/features/org.eclipse.epp.package.modeling.feature_4.6.0.20160601-1520/feature.xml.
>> !SUBENTRY 2 org.eclipse.equinox.p2.publisher.eclipse 4 17 2016-07-01
>> 15:41:29.073
>> !MESSAGE Error parsing feature: "require" must include at least one
>> "import" element.
>>
>> !ENTRY org.eclipse.pde.build 4 1 2016-07-01 15:41:29.151
>> !MESSAGE Problems parsing the feature file:C:/Eclipse
>> E/eclipse/features/org.eclipse.epp.package.modeling.feature_4.6.0.20160601-1520/feature.xml.
>> !STACK 1
>> org.eclipse.core.runtime.CoreException: Problems parsing the feature
>> file:C:/Eclipse
>> E/eclipse/features/org.eclipse.epp.package.modeling.feature_4.6.0.20160601-1520/feature.xml.
>> at
>> org.eclipse.pde.internal.build.site.BuildTimeFeatureFactory.parseBuildFeature(BuildTimeFeatureFactory.java:85)
>> at
>> org.eclipse.pde.internal.build.site.BuildTimeFeatureFactory.createFeature(BuildTimeFeatureFactory.java:50)
>> at
>> org.eclipse.pde.internal.build.site.BuildTimeSite.createFeature(BuildTimeSite.java:458)
>> at
>> org.eclipse.pde.internal.build.site.compatibility.FeatureReference.getFeature(FeatureReference.java:39)
>> at
>> org.eclipse.pde.internal.build.site.BuildTimeSite.resolveFeatureReferences(BuildTimeSite.java:316)
>> at
>> org.eclipse.pde.internal.build.site.BuildTimeSite.findFeature(BuildTimeSite.java:285)
>> at
>> org.eclipse.pde.internal.build.site.BuildTimeSite.findFeature(BuildTimeSite.java:277)
>> at
>> org.eclipse.pde.internal.build.BuildScriptGenerator.generateFeatures(BuildScriptGenerator.java:249)
>> at
>> org.eclipse.pde.internal.build.BuildScriptGenerator.generate(BuildScriptGenerator.java:127)
>> at
>> org.eclipse.pde.internal.core.exports.FeatureExportOperation.doExport(FeatureExportOperation.java:255)
>> at
>> org.eclipse.pde.internal.core.exports.FeatureBasedExportOperation.run(FeatureBasedExportOperation.java:51)
>> at
>> org.eclipse.pde.internal.core.exports.SiteBuildOperation.run(SiteBuildOperation.java:66)
>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>> Contains: Error parsing feature: "require" must include at least one
>> "import" element.
>> !SUBENTRY 1 org.eclipse.equinox.p2.publisher.eclipse 4 17 2016-07-01
>> 15:41:29.151
>> !MESSAGE Problems parsing the feature file:C:/Eclipse
>> E/eclipse/features/org.eclipse.epp.package.modeling.feature_4.6.0.20160601-1520/feature.xml.
>> !SUBENTRY 2 org.eclipse.equinox.p2.publisher.eclipse 4 17 2016-07-01
>> 15:41:29.151
>> !MESSAGE Error parsing feature: "require" must include at least one
>> "import" element.
>>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Acceleo UI plugin doesn't generate anything [message #1736847 is a reply to message #1736830] Sun, 03 July 2016 03:17 Go to previous messageGo to next message
Zuriel Morales is currently offline Zuriel MoralesFriend
Messages: 12
Registered: March 2016
Junior Member
I think I understand what the problem is now. This .emtl file that Eclipse can't find isn't a misnamed extension: it's a compiled form of the .mtl file. I read in another post that Acceleo will to compile this file on its own, but apparently it's not doing so in my case. Is there anything I can do to force Acceleo or manually tell it to compile it?
Re: Acceleo UI plugin doesn't generate anything [message #1736848 is a reply to message #1736847] Sun, 03 July 2016 05:20 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Can't you compile it before you export it, rather than rely on compiling
in the importing context?

Regards

Ed Willink

On 03/07/2016 04:17, Zuriel Morales wrote:
> I think I understand what the problem is now. This .emtl file that
> Eclipse can't find isn't a misnamed extension: it's a compiled form of
> the .mtl file. I read in another post that Acceleo will to compile this
> file on its own, but apparently it's not doing so in my case. Is there
> anything I can do to force Acceleo or manually tell it to compile it?


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Re: Acceleo UI plugin doesn't generate anything [message #1736860 is a reply to message #1736848] Sun, 03 July 2016 21:17 Go to previous messageGo to next message
Zuriel Morales is currently offline Zuriel MoralesFriend
Messages: 12
Registered: March 2016
Junior Member
Can you give me an idea on how to do it?
Re: Acceleo UI plugin doesn't generate anything [message #1736866 is a reply to message #1736860] Mon, 04 July 2016 05:17 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

IIRC Acceleo builds it automatically. You just need to include it when
exporting. I think I used to copy it from the bin folder where it was
generated to a src folder where it could be exported.

The "customBuildCallbacks = build.acceleo" in build.properties can be
removed when you do not want a build.

Sorry my memory of my workaround from five years ago is not good, and
GIT is not helpful at viewing the history of my obsolete archived plugins.

Regards

Ed Willink


On 03/07/2016 23:17, Zuriel Morales wrote:
> Can you give me an idea on how to do it?


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Re: Acceleo UI plugin doesn't generate anything [message #1737023 is a reply to message #1736866] Tue, 05 July 2016 07:44 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
Hi,

Acceleo searching for the "emtl" file is normal, that's the way it's supposed to be. The template is a "mtl" file, the compiled form has the "emtl" extension. You say you're using an UI project. Are you trying to run it from a runtime eclipse (you have a first eclipse that contains your project, you launched an "eclipse application" from there and are using the UI generator project from that second eclipse), or did you build the UI and generator projects then installed them in your eclipse? If it's that second case, how did you build the projects? Can you describe your process?

Laurent Goubet
Obeo
Re: Acceleo UI plugin doesn't generate anything [message #1737114 is a reply to message #1737023] Tue, 05 July 2016 20:17 Go to previous messageGo to next message
Zuriel Morales is currently offline Zuriel MoralesFriend
Messages: 12
Registered: March 2016
Junior Member
Hi everyone, I found the problem. I'm posting it in case someone runs into the same issue in the future.

I found out Acceleo doesn't put the .emtl file in the same place where the .mtl is - it actually places it in a folder called "bin", which isn't created by default when exporting the plugin. In order to see this "bin" folder, I had to mark it in "Build Configuration", in the build.properties file.

Then, I manually copied the .etml in "bin" to the plugin's "main" folder (where the .mtl file resides) and that was it, it worked like a charm. Thank you Laurent, Ed Merks and Ed Willinks for your replies.
Re: Acceleo UI plugin doesn't generate anything [message #1744868 is a reply to message #1737114] Sat, 01 October 2016 03:30 Go to previous messageGo to next message
Patrik Nandorf is currently offline Patrik NandorfFriend
Messages: 195
Registered: January 2013
Location: Sweden
Senior Member
Great! I've been struggling with this for some time now and finally found the solution.

How come the .etml files are not placed correctly from the start? Is there a configuration for this?
Re: Acceleo UI plugin doesn't generate anything [message #1744945 is a reply to message #1744868] Mon, 03 October 2016 08:11 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
Patrik,

The emtl "are" placed correctly : the "mtl" file is your template, the "emtl" is the compiled form of it. Just as you don't see the ".class" compiled java files beside your ".java" ones, the template is the source, and the compiled form is placed in the bin folder.

As long as you're using an UI project to start your generation you shouldn't have any issues on that point. Issues will arise if you're trying to export the generators as .jar without using maven to compile the acceleo templates since the eclipse pde builder causes issues with the compiled emtl files (namely, it doesn't include it in the exported jars). I'd have to know how you're starting your generation, how you're compiling the templates and how you're exporting them as jar if you do to help on that aspect.

Laurent Goubet
Obeo
Re: Acceleo UI plugin doesn't generate anything [message #1744953 is a reply to message #1744945] Mon, 03 October 2016 11:17 Go to previous messageGo to next message
Patrik Nandorf is currently offline Patrik NandorfFriend
Messages: 195
Registered: January 2013
Location: Sweden
Senior Member
Hi Laurent,

Thanks for you quick answer.

I'm using Papyrus + Acceleo on Ubuntu.

What I doing is that I've created a plugin in which I have a command that triggers the generation. It works well when I try it ou in a runtime workbench but when I deploy the plugin I get several issues.

For the commmand's handler I start the generation like this (the in.uml model is just a model with one class):

		URI modelURI = URI.createPlatformPluginURI("org.eclipse.acceleo.module.sample/models/in.uml", true);
		File targetFolder = new File("/out");
		try {
			Generate gen = new Generate(modelURI, targetFolder, Collections.EMPTY_LIST);
			gen.doGenerate(null);
		} catch (IOException e) {
			e.printStackTrace();
		}


If I don't change anything in the build.properties (wrt .emtl files) I get an exception:

java.io.IOException: '/org/eclipse/acceleo/module/sample/main/generate.emtl' not found

Including 'bin' in build.properties didn't help

The only thing that works is to manully copy the emtl file to the same location as the .mtl file before I export the plugin

Quote:
Issues will arise if you're trying to export the generators as .jar without using maven to compile the acceleo templates

Any instructions how to compile the templates using maven?

/Patrik
Re: Acceleo UI plugin doesn't generate anything [message #1745107 is a reply to message #1744953] Wed, 05 October 2016 09:38 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
Hi,

Yes, this is the kind of issues I mentionned, since your "deployed" modules are likely built through the pde builder which doesn't consider the emtl files for export and thus won't include them in the exported jars. Copying the emtl files in the src folder is indeed a workaround for that, albeit ugly Smile. You can find more information about the maven tasks to build and deploy acceleo plugins on the wiki.

Laurent Goubet
Obeo
Previous Topic:[Acceleo] Maven build for Acceleo 3.3
Next Topic:[Acceleo] Supress generation popups?
Goto Forum:
  


Current Time: Fri Apr 19 14:55:47 GMT 2024

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

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

Back to the top