Skip to main content



      Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo 3] how to Define queries in many modules
[Acceleo 3] how to Define queries in many modules [message #547617] Mon, 19 July 2010 03:28 Go to next message
Eclipse UserFriend
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


[Updated on: Mon, 19 July 2010 03:41] by Moderator

Re: [Acceleo 3] how to Define queries in many modules [message #547632 is a reply to message #547617] Mon, 19 July 2010 04:29 Go to previous messageGo to next message
Eclipse UserFriend
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:
http://img834.imageshack.us/img834/9082/utilitymodule.png

And then, each time you need it, you just have to import it like this:
http://img20.imageshack.us/img20/9075/importmodule.png

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:
http://img31.imageshack.us/img31/9692/useinprojectp.png

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.
http://img828.imageshack.us/img828/8845/adddependency.png

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):
http://img835.imageshack.us/img835/3336/exportpackage.png

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 #547644 is a reply to message #547617] Mon, 19 July 2010 05:09 Go to previous messageGo to next message
Eclipse UserFriend
Thank for the reply and for the details...
Its resolved Wink

Re: [Acceleo 3] how to Define queries in many modules [message #549099 is a reply to message #547617] Sat, 24 July 2010 08:07 Go to previous messageGo to next message
Eclipse UserFriend
Hello Stephane,

Is there a way to have this working in standalone compilation ?
As said in this thread, The compiler cannot find dependencies present in jar files of the classpath.

Is there a workaround or is it a blocking bug ?
Re: [Acceleo 3] how to Define queries in many modules [message #549101 is a reply to message #547617] Sat, 24 July 2010 08:55 Go to previous message
Eclipse UserFriend
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
Previous Topic:[ATL] Problem ATL query with Eclipse helios
Next Topic:MTL Escape Characters
Goto Forum:
  


Current Time: Tue Jul 22 06:59:23 EDT 2025

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

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

Back to the top