Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Sharing a library module over several projects(Where to find a complete ATL syntax reference?)
Sharing a library module over several projects [message #1858491] Wed, 05 April 2023 06:18 Go to next message
Yves BERNARD is currently offline Yves BERNARDFriend
Messages: 152
Registered: July 2014
Senior Member
I struggle in finding the right syntax for a "uses" statement that refers to a library module store outside an ATL project, that is: basically in another Eclipse (ATL) project. This is actually the only way I see for sharing this libraries over multiples projects.

By the way, I cannot find a document about a complete reference of the ATL syntax.


Yves

[Updated on: Wed, 05 April 2023 06:18]

Report message to a moderator

Re: Sharing a library module over several projects [message #1858512 is a reply to message #1858491] Wed, 05 April 2023 14:19 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 589
Registered: September 2012
Location: Belgium
Senior Member

The ATL syntax reference can be found at https://wiki.eclipse.org/M2M/ATL/Syntax

That said, before EMFTVM the "uses" clause only served as documentation. In EMFTVM, you can list the modules/libraries you want to import by name. The imported modules will only be validated/resolved when launching your transformation, and must be found within the module path specified in the launch config.

The "uses" clause basically uses the same syntax as the Java "import" statement, e.g.

uses MyLib;
uses "subdir::OtherModule";


Note that modules with a qualified name must be double-quoted.


Cheers,
Dennis
Re: Sharing a library module over several projects [message #1858518 is a reply to message #1858512] Wed, 05 April 2023 16:15 Go to previous messageGo to next message
Yves BERNARD is currently offline Yves BERNARDFriend
Messages: 152
Registered: July 2014
Senior Member
Thank you for your reply and for the URL, I've bookmarked it :-)

Nevertheless this EBNF does not describe the valid syntax of the IDENTIFIER elements.

I get from what you say (and from previous example I made) that the path elements it contains shall be separated by a double colon (::).

It works well as long as you want to refer to a sub folder. That is: within the same project. My point is about libraries that are outside that project. I tried miscellaneous syntaxes (relative and absolute) in the module itself and in the launcher path for the module without success.

Actually, following what you said with regard to the launcher configuration, I succeeded in making it works by adding the path to the project holding the shared library and specifying no path within the "uses" directive

Thanks for your help.


Yves
Re: Sharing a library module over several projects [message #1858523 is a reply to message #1858518] Wed, 05 April 2023 17:01 Go to previous message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 589
Registered: September 2012
Location: Belgium
Senior Member

Yves BERNARD wrote on Wed, 05 April 2023 18:15
Actually, following what you said with regard to the launcher configuration, I succeeded in making it works by adding the path to the project holding the shared library and specifying no path within the "uses" directive

That's how it's supposed to work: the module path provides the main locations of .emftvm files, and you pick which to load with the "uses" statements. By specifying different module paths, you can load alternative sets of .emftvm modules.


Cheers,
Dennis
Previous Topic:Trace Model ATL
Next Topic:Setting a multi-valued tagged value
Goto Forum:
  


Current Time: Thu Apr 25 06:58:33 GMT 2024

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

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

Back to the top