Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » xtext grammar import ATL metamodel
xtext grammar import ATL metamodel [message #1053683] Tue, 07 May 2013 08:40 Go to next message
Fi Fi is currently offline Fi Fi
Messages: 133
Registered: March 2010
Senior Member
Dear All,
I try to define a dsl which use some elements defined in an atl transformation.

So, using TCS injection of ATL, the textual representation of ATL transformation is generated as an xmi model conforms to ATL metamodel.
for example,
<?xml version="1.0" encoding="ISO-8859-1"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:atl="http://www.eclipse.org/gmt/2005/ATL" xmlns:ocl="http://www.eclipse.org/gmt/2005/OCL">
  <atl:Module location="1:1-391:2" name="S2F">
    <inModels location="5:2-5:27" name="SModel" metamodel="/48"/>
    <outModels location="3:2-3:31" name="FModel" metamodel="/47"/>
    <outModels name="SModel2FModel" metamodel="/1"/>
    <elements xsi:type="atl:MatchedRule" location="7:1-100:2" name="Process2Program">
.....
.....


Therefore, I try to refer in my dsl to some elements in the atl model.

I define an import:
import "platform:/resource/MetaModels/ATL.ecore" as atl


For example, a kind of xtext rule.
Affectation:
	reference  = ID '<-' rule=[atl::MatchedRule]
;


However, when I run the workflow, I have error (which is normal) because
"Could not find a GenModel for EPackage 'http://www.eclipse.org/gmt/2005/ATL'".

By contrast, ATL haven't a Genmodel (ATL.genmodel).

How can I resolve this problem, please.

Best regards,
Re: xtext grammar import ATL metamodel [message #1385450 is a reply to message #1053683] Fri, 06 June 2014 13:50 Go to previous messageGo to next message
Smail RAHMOUN is currently offline Smail RAHMOUN
Messages: 1
Registered: June 2014
Junior Member
Hi, i am interested about this issue, did you found an answer ? Best regards.
Re: xtext grammar import ATL metamodel [message #1385476 is a reply to message #1385450] Fri, 06 June 2014 18:14 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6307
Registered: July 2009
Senior Member
you have to register the genmodels in the workflow (as it is done with the xbase in the workflow created by the wizard)
Re: xtext grammar import ATL metamodel [message #1385639 is a reply to message #1385476] Tue, 10 June 2014 08:21 Go to previous message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARD
Messages: 522
Registered: July 2009
Senior Member
You can :
- create the genmodel and use it in xtext
- I believe there was a "registerEcoreFile" option for the mwe workflow
Previous Topic:Access to Java Fields at DSL
Next Topic:project java --> +/- java
Goto Forum:
  


Current Time: Sat Sep 20 18:12:10 GMT 2014

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

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