Skip to main content



      Home
Home » Modeling » TMF (Xtext) » xtext grammar import ATL metamodel
xtext grammar import ATL metamodel [message #1053683] Tue, 07 May 2013 04:40 Go to next message
Eclipse UserFriend
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 09:50 Go to previous messageGo to next message
Eclipse UserFriend
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 14:14 Go to previous messageGo to next message
Eclipse UserFriend
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 04:21 Go to previous message
Eclipse UserFriend
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: Fri Jul 25 17:55:49 EDT 2025

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

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

Back to the top