Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » [ATL] Library in EMFTVM launch config?(How to load a library required by a module in an EMFTVM launch configuration?)
[ATL] Library in EMFTVM launch config? [message #1219782] Thu, 05 December 2013 18:47 Go to next message
Gunnar Arndt is currently offline Gunnar ArndtFriend
Messages: 82
Registered: June 2012
Member
Hi guys,

who knows how to add a library to an EMFTVM launch config?
I have an ATL module which requires an ATL library (presenterLib.atl); they work together no problem with @atlcompiler atl2006 and a matching launch config, but I have not found a way to load the library in an EMFTVM specific launch config.

Error message:
org.eclipse.m2m.atl.emftvm.util.VMException: Error during module loading: Error during module loading: Module presenterLib not found


Thank you for suggestions.
Re: [ATL] Library in EMFTVM launch config? [message #1219831 is a reply to message #1219782] Fri, 06 December 2013 08:05 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 589
Registered: September 2012
Location: Belgium
Senior Member

Your libraries have to be on the "module path": http://wiki.eclipse.org/ATL/EMFTVM#Module_import

Note that the library/module name must also be a qualified name w.r.t. the module path: if the module path is "/home/someone", and your module sits in "/home/someone/package/Module.atl", then your module name should be "package::Module". See for example http://git.eclipse.org/c/mmt/org.eclipse.atl.git/tree/tests/org.eclipse.m2m.atl.emftvm.tests/test-data/Regression/Bug419433.atl


Cheers,
Dennis
Re: [ATL] Library in EMFTVM launch config? [message #1219860 is a reply to message #1219782] Fri, 06 December 2013 10:20 Go to previous messageGo to next message
Gunnar Arndt is currently offline Gunnar ArndtFriend
Messages: 82
Registered: June 2012
Member
Dennis, thanks for the hint. I'm not yet sure how to transfer that exactly to my problem.

The importing module is in
/com.customer.dat.modeltransformation.startek/src/com/customer/dat/modeltransformation/startek/atl/files/transformate2startek.atl

and the library to be loaded is in
/com.customer.dat.modeltransformation.startek.atl.lib/src/com/customer/dat/modeltransformation/atl/lib/presenterLib.atl


I'm using
/com.customer.dat.modeltransformation.startek.atl.lib/src/com/customer/dat/modeltransformation/atl/lib/,/com.customer.dat.modeltransformation.startek/src/com/customer/dat/modeltransformation/startek/atl/files/

as module path in the launch config, and I'm not sure how to modify the library's name and the import in the using module. Can you specify your suggestion further?

[Updated on: Fri, 06 December 2013 10:20]

Report message to a moderator

Re: [ATL] Library in EMFTVM launch config? [message #1219877 is a reply to message #1219860] Fri, 06 December 2013 13:25 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 589
Registered: September 2012
Location: Belgium
Senior Member

Your module path looks fine to me. Can you show me the first few lines of presenterLib.atl?

Cheers,
Dennis
Re: [ATL] Library in EMFTVM launch config? [message #1219878 is a reply to message #1219782] Fri, 06 December 2013 13:43 Go to previous messageGo to next message
Gunnar Arndt is currently offline Gunnar ArndtFriend
Messages: 82
Registered: June 2012
Member
Sure thing:
-- @atlcompiler emftvm
library presenterLib;

--- This is an apparently very general helper which is intended
--- to be used for OclUndefined only.
helper context OclAny def: getSpecification(): String = '';

helper context transformate!MessageModelTransformer def: getSpecification(): String = 
	self.message;

--- Many more of those helpers...


I had a partial success by moving that file to the same directory as the ATL module that uses it: There is no more error message in that case. Instead, just plain nothing happens.
Re: [ATL] Library in EMFTVM launch config? [message #1220014 is a reply to message #1219878] Mon, 09 December 2013 07:43 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
Hi Gunnar, I'm not entirely sure but I think you would need to change the name of your transformations to include the path (at least that's how I made it work for myself), this is what I use:

- Main module:
module "Transformations::RCP2GWTPSM2PIM";
create OUT: UML2 from IN: UML2, Plugin: XML, Profile: profile;
uses "Transformations::Libraries::UMLLibrary";

- Library:
library "Transformations::Libraries::UMLLibrary";


That's the header on each of the ATL files and it works fine for me, hopefully for you too!
Re: [ATL] Library in EMFTVM launch config? [message #1853952 is a reply to message #1219782] Mon, 25 July 2022 13:30 Go to previous message
Gunnar Arndt is currently offline Gunnar ArndtFriend
Messages: 82
Registered: June 2012
Member
I'm currently giving EMFTVM another try (after 9 years!).
The solution was to rename the importing project from
com.customer.dat.modeltransformation.startek

to
com.customer.dat.modeltransformation.startek.atl.files

so its name is no longer a prefix of the library project name
com.customer.dat.modeltransformation.startek.atl.lib


And of course add both comma-separated to the module path.

[Updated on: Mon, 25 July 2022 13:31]

Report message to a moderator

Previous Topic:Collecting all instances and calculating the values
Next Topic:How can I tranform a feature of the Parent class accessing from the chield class?
Goto Forum:
  


Current Time: Thu Mar 28 09:10:23 GMT 2024

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

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

Back to the top