Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » ATL Transformation between validation and generation - how to insert
ATL Transformation between validation and generation - how to insert [message #919244] Fri, 21 September 2012 20:44 Go to next message
Cristiano De Faveri is currently offline Cristiano De FaveriFriend
Messages: 13
Registered: August 2012
Junior Member
Hi,

The standard flow generated by Xtext is

L1 text -> Model L1 -> Generate L2 text


I'd like to insert a step between validation and code generation that will perform a transformation done by ATL, like this :

L1 text -> Model L1 -> ATL Transformation -> Model L1' -> Generate L2 text

I have worked in ATL code already. I just would like to have a step between validation and generation that could read the model generated by xtext (as long as user is typing on editor as usual), make it available to ATL Module that will generate another model that again should be available for the generator writing the properly text. Could anyone help in this issue or could point where I can find some documentation about it? Neither xtext manual nor google has help me Confused

Many thanks.

Cristiano
Re: ATL Transformation between validation and generation - how to insert [message #1045588 is a reply to message #919244] Sat, 20 April 2013 14:13 Go to previous messageGo to next message
serhat gezgin is currently offline serhat gezginFriend
Messages: 240
Registered: January 2013
Location: Izmir
Senior Member
Hi Cristiano

Could u success your problem ?

I need to atl and xtext worktogether too

Regards
Re: ATL Transformation between validation and generation - how to insert [message #1047603 is a reply to message #1045588] Tue, 23 April 2013 12:40 Go to previous messageGo to next message
Ronan B is currently offline Ronan BFriend
Messages: 249
Registered: July 2009
Senior Member
Hi,
ATL/XText work very well together. ATL just sees your XText grammar as an Ecore model. So you transform from source to target as usual. You then leave XText to handle the serialization.

As long as the input/output models use the expected file extension, as defined by you, then ATL need not know anything about the model being based on an XText grammar. It is seamless. ATL will leave serialization and deserialization to Xtext/Ecore.

Regards,
Ronan
Re: ATL Transformation between validation and generation - how to insert [message #1049742 is a reply to message #1047603] Fri, 26 April 2013 08:06 Go to previous messageGo to next message
serhat gezgin is currently offline serhat gezginFriend
Messages: 240
Registered: January 2013
Location: Izmir
Senior Member
I try to convert model by atl transformation but i always get this error;

Error loading platform:/resource/filesystem.atl.plugin/model/default.filesystem: org.xml.sax.SAXParseExceptionpublicId: platform:/resource/filesystem.atl.plugin/model/default.filesystem; systemId: platform:/resource/filesystem.atl.plugin/model/default.filesystem; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.


my input file;

Filesystem filesystem{

	Drive D {
		Folder B { }
	}

}


What i must do to use xtext program like input model ?

Regards

[Updated on: Fri, 26 April 2013 08:11]

Report message to a moderator

Re: ATL Transformation between validation and generation - how to insert [message #1049748 is a reply to message #1049742] Fri, 26 April 2013 08:15 Go to previous message
Ronan B is currently offline Ronan BFriend
Messages: 249
Registered: July 2009
Senior Member
Hi,
This is more of an ATL question than XText so maybe direct your queries to the ATL Forum. Anywho, take a look at http://www.eclipse.org/forums/index.php/t/159523/

Your problem is you must inject the XText file to an XMI representation of the resource that Ecore can understand (this was noted in the first post in this thread). Once you have the injected version you can do a transfrom in ATL. The output of the transfrom will be extracted back to a text file by XText if you use the right extension for the output file name.

Regards,
Ronan
Previous Topic:XText ValueConverter And Generated Editor Issue
Next Topic:Xtext 2.4 scoping
Goto Forum:
  


Current Time: Wed Nov 26 06:58:33 GMT 2014

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

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