|
Re: How to reuse queries in multiple templates? [message #1693155 is a reply to message #1691658] |
Wed, 22 April 2015 06:50 |
Tristan Faure Messages: 460 Registered: July 2009 |
Senior Member |
|
|
Hello
you can share multiple queries using Gendoc bundles. These bundles are Acceleo queries encapsulation so you can use them in your template
This is not yet described in the gendoc documentation but please find bellow explanations :
-create an acceleo project and your queries in one mtl
- in this eclipse plugin add org.eclipse.gendoc.script.acceleo plugin to your dependencies
- create an extension point org.eclipse.gendoc.script.acceleo.services
- define a name (the same as your mtl)
- reference the emtl corresponding to your mtl (search in your tree in the bin/* folder)
- set false to imported by default
- please take care that your emtl file is also referenced in build section of your plugin (build.properties)
- export your plugin or test in runtime
- now in your template you can reference your template in context tag using the name you defined your extension point. You can also use your queries in your acceleo code within <gendoc> section
<context ... importedBundles='yourBundle' />
[Updated on: Wed, 22 April 2015 12:21] Report message to a moderator
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03969 seconds