[Acceleo] Working with multiple input models and metamodels [message #1784101] |
Thu, 22 March 2018 10:47  |
Eclipse User |
|
|
|
I have a very clear scenario. I want to work with two input models in an Acceleo project. These two models may have the same or different underlying metamodels. I have tried all possible permutation of code syntax but none works.
I know that Acceleo supports defining multiple metamodels as follows:
[module generate('http://www.eclipse.org/uml2/5.0.0/UML', 'http://www.xtext.org/example/novadsl/NovaDsl')]
where i am working with the UML metamodel and a metamodel of my own DSL defined using XText. However, I cannot take as input two different models for the two metamodels using the following syntax:
[template public generateElement(bModel : Model, aModel : Model)]
[comment @main/]
....
[/template]
When I try to run this acceleo project i get the following exception:
Exception in thread "main" org.eclipse.acceleo.engine.AcceleoEvaluationException: Could not find public template generateElement in module generate.
at org.eclipse.acceleo.engine.service.AcceleoService.findTemplates(AcceleoService.java:1201)
at org.eclipse.acceleo.engine.service.AcceleoService.doGenerate(AcceleoService.java:616)
at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator.generate(AbstractAcceleoGenerator.java:209)
at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator.generate(AbstractAcceleoGenerator.java:172)
at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator.doGenerate(AbstractAcceleoGenerator.java:159)
at org.eclipse.acceleo.ndslmult2txt.main.Generate.doGenerate(Generate.java:204)
at org.eclipse.acceleo.ndslmult2txt.main.Generate.main(Generate.java:162)
The same problem persists when I have only one metamodel in the [module generate......], i.e., irrespective of the number of metamodels that I include in my generate.mtl file, Acceleo cannot accept more than one input model in the current settings.
Is there a solution or workaround to this problem? I just want to work with 2 input models (irrespective of the number of metamodels) in an Acceleo project.
If this is possible,then can you kindly give a step-by-step tutorial how this can be done!!
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07230 seconds