Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » File2Model by EMFTVM
File2Model by EMFTVM [message #1786141] Thu, 26 April 2018 06:30 Go to next message
neda karshenas is currently offline neda karshenasFriend
Messages: 10
Registered: February 2016
Junior Member
I want to turn the user code into a model in a Java program. How can I do it with EMFTVM tools?
In fact, what class of EMFTVM tools should call Java code ?
thank's
Re: File2Model by EMFTVM [message #1786191 is a reply to message #1786141] Thu, 26 April 2018 16:08 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 372
Registered: September 2012
Location: Belgium
Senior Member

I suspect you need another tool than ATL/EMFTVM to do that.
Can you give an example if the "user code"?


Cheers,
Dennis
Re: File2Model by EMFTVM [message #1786217 is a reply to message #1786191] Fri, 27 April 2018 05:11 Go to previous messageGo to next message
neda karshenas is currently offline neda karshenasFriend
Messages: 10
Registered: February 2016
Junior Member
Hi
Any examples of ATL such as: class2relational, book2publication, ...
In fact, I want to write a Java program that converts a ATL input transformation from the user to the ATL input model. Then a model transformation is executed on the generated model and the ATL output model is generated.
How can I use EMFTVM in the Java program to generate the model?
very thank's.
Re: File2Model by EMFTVM [message #1787507 is a reply to message #1786217] Sun, 27 May 2018 19:28 Go to previous message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 372
Registered: September 2012
Location: Belgium
Senior Member

In a standalone Java setting, you should register the AtlResourceFactoryImpl for loading and saving .atl files:
resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("atl",
	new AtlResourceFactoryImpl());

You can then load/save .atl files directly as EMF models. See also http://git.eclipse.org/c/mmt/org.eclipse.atl.git/tree/plugins/org.eclipse.m2m.atl.emftvm.ant/src_ant/org/eclipse/m2m/atl/emftvm/ant/EMFTVMTask.java for an example.


Cheers,
Dennis
Previous Topic:ATL how to Hide Tag?
Next Topic:[EMFTVM] Empty output model with programatically generated meta- and inputmodel
Goto Forum:
  


Current Time: Sat Sep 22 05:44:13 GMT 2018

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

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

Back to the top