[Acceleo 3] how to Define queries in many modules [message #547617] |
Mon, 19 July 2010 07:28 |
Laviale Benoit Messages: 25 Registered: April 2010 Location: Paris |
Junior Member |
|
|
Good Morning...
I would like to know how to "define" a query in all of my MTL modules.
exemple :
Module A :
template 1
template 2 (Use foo)
....
[query public foo ]
Module B
template 3 (use foo, but it is not accessible)
I try to define the query in my "main mtl module" but it's not the issue...
Thank for the help
Regards
Benoit
Trainee
Thales Communications France
[Updated on: Mon, 19 July 2010 07:41] Report message to a moderator
|
|
|
Re: [Acceleo 3] how to Define queries in many modules [message #547632 is a reply to message #547617] |
Mon, 19 July 2010 08:29 |
|
Hi,
If you want to use an utility template or query in several modules, you can just define it in an "utility" module like this:
And then, each time you need it, you just have to import it like this:
You can even define it in another project if you want to keep all your utility stuff in one place and then import it in your main project:
But in order to import a module in another module, the module that import the other one need to "see it". So if you are in another project, you need to add a dependency to the project which contain the module in the MANIFEST.MF file of the new project.
And in the project that contain the utility module, you need to export its package in the MANIFEST.MF file (a warning should appear if it's not done, and Acceleo does it by default anyway):
So to make it short:
1- make sure your utility module is visible (MANIFEST.MF of your project -> runtime tab -> export package)
2- if your are in another project, MANIFEST.MF -> dependencies -> add a dependency with you utility project
3- [import myUtilityStuff/] and then you're good to go.
Stéphane Bégaudeau, Obeo
|
|
|
|
|
Re: [Acceleo 3] how to Define queries in many modules [message #549101 is a reply to message #547617] |
Sat, 24 July 2010 12:55 |
|
Hi Sebastien,
I'm not an expert with the stand alone mode (and since I'm not at work, I can't test it correctly while looking in our source code to see if there's a bug or not) but Laurent Goubet (who knows more about it than me) will come back from holiday monday and I'll ask him about it monday morning.
Stephane Begaudeau, Obeo
|
|
|
Powered by
FUDForum. Page generated in 0.03923 seconds