Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 07:28 Go to next message
Laviale Benoit is currently offline Laviale BenoitFriend
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 Go to previous messageGo to next message
Stephane Begaudeau is currently offline Stephane BegaudeauFriend
Messages: 458
Registered: April 2010
Location: Nantes (France)
Senior Member

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 09:09 Go to previous messageGo to next message
Laviale Benoit is currently offline Laviale BenoitFriend
Messages: 25
Registered: April 2010
Location: Paris
Junior Member
Thank for the reply and for the details...
Its resolved Wink



Trainee
Thales Communications France
Re: [Acceleo 3] how to Define queries in many modules [message #549099 is a reply to message #547617] Sat, 24 July 2010 12:07 Go to previous messageGo to next message
Sebastien Roy is currently offline Sebastien RoyFriend
Messages: 51
Registered: November 2009
Member
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 12:55 Go to previous message
Stephane Begaudeau is currently offline Stephane BegaudeauFriend
Messages: 458
Registered: April 2010
Location: Nantes (France)
Senior Member

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: Mon May 13 04:57:51 GMT 2024

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

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

Back to the top