Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » [EMFTVM] Compile ATL to EMFTVM transformation and running the transformation in a Java program
[EMFTVM] Compile ATL to EMFTVM transformation and running the transformation in a Java program [message #1767686] Sun, 09 July 2017 22:26 Go to next message
Chung-Ling Lin is currently offline Chung-Ling LinFriend
Messages: 39
Registered: December 2011
Member
Hi,

I want to write a Java program to compile a ATL transformation to a EMFTVM transformation and run the transformation. I found the Java program below will return a compiled model from a ATL transformation.

http://git.eclipse.org/c/mmt/org.eclipse.atl.git/tree/tests/org.eclipse.m2m.atl.emftvm.tests/src/org/eclipse/m2m/atl/emftvm/tests/compiler/CompilerTest.java

But the EMFTVM wiki shows that I need to load the transformation module via a module resolver, and the module resolver takes either the uriPrefix or the java class path to load the module. How can I load the transformation module from the Model returned by the compile method ?

Chung-Ling Lin
Re: [EMFTVM] Compile ATL to EMFTVM transformation and running the transformation in a Java program [message #1767763 is a reply to message #1767686] Mon, 10 July 2017 19:29 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 589
Registered: September 2012
Location: Belgium
Senior Member

The HEAD version of AtlToEmftvmCompiler.java no longer has any dependencies on the Eclipse workspace, so you should be able to use that from a Java program.

You can download the latest EMFTVM build from Eclipse Marketplace.


Cheers,
Dennis
Re: [EMFTVM] Compile ATL to EMFTVM transformation and running the transformation in a Java program [message #1767764 is a reply to message #1767763] Mon, 10 July 2017 19:48 Go to previous message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 589
Registered: September 2012
Location: Belgium
Senior Member

EMFTVMLauncher.loadModule() shows a trick to prepare a ResourceSet with your Model's Resources, such that it can be used directly by the DefaultModuleResolver. Alternatively, you can build your own ModuleResolver implementation.

Cheers,
Dennis
Previous Topic:null is undefined
Next Topic:The resulted model of the ATL launcher file is empty.
Goto Forum:
  


Current Time: Fri Apr 19 00:38:54 GMT 2024

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

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

Back to the top