Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Getting started with xtext and Xapnd --> MWE configuration
Getting started with xtext and Xapnd --> MWE configuration [message #667554] Fri, 29 April 2011 14:01 Go to next message
Yvette is currently offline YvetteFriend
Messages: 13
Registered: May 2010
Junior Member
Hello,
I just getting started with xtext. It is very cool. After defining my grammar I would like to define M2T transformations. I have a problem with my workflow configuration . I have the following *.mwe-file;

<?xml version="1.0"?>
<workflow>
    <property file="workflow.properties"/>
	 	 <property file="workflow.properties"/>

	
	<!-- set up EMF for standalone execution  -->
		
	<bean class="org.eclipse.emf.mwe.utils.StandaloneSetup" >
		<platformUri value=".."/>
	</bean>

	<!-- load model and store it in slot 'model' -->
	<component class="org.eclipse.emf.mwe.utils.Reader">
		<uri value="platform:/resource/${model}" />
		<modelSlot value="model" />
	</component>
	


<!--
	<component class="org.eclipse.xtend.check.CheckComponent">
		<metaModel id="autMaisDim"
			class="org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel"/>
		<checkFile value="metamodel::Checks" />
		<emfAllChildrenSlot value="model" />
	</component>
	-->


	<!--  generate code -->
	<component class="org.eclipse.xpand2.Generator">
		  <metaModel id="mm2" class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
  		<metaModelFile value="MyDsl.ecore"/>
	</metaModel>

		<expand     
			value="GeneratateDimension::csClass FOR model" />
		 <outlet path="${srcGenPath}/">
    </outlet>
	</component> 
</workflow>



When I start the workflow, I get the following error:
843 ERROR WorkflowRunner - org.xml.sax.SAXParseException: Content is not allowed in prolog.
The same error I got when accessing the grammar instance by code. To help me with this problem I extended

public class MydslStandaloneSetupSelf extends MyDslStandaloneSetup {
	public static void doSetup() {
		new MyDslStandaloneSetup().createInjectorAndDoEMFRegistration();
	}
}


After calling the setup Method accessing via api went fine. But how to do this with mwe workflow?

Thanks in advance!


Yvette
Re: Getting started with xtext and Xapnd --> MWE configuration [message #667565 is a reply to message #667554] Fri, 29 April 2011 14:53 Go to previous message
Yvette is currently offline YvetteFriend
Messages: 13
Registered: May 2010
Junior Member
I found out myself.

it must be

	<component id="busmod2crossx-modelfileReader"
	class="org.eclipse.xtext.MweReader" uri="platform:/resource/${model}"
	outputSlot="model">
	<register
	class="automais.Setup"/>
	</component>
Previous Topic:Scope Provider
Next Topic:Scoping and the order of declarations
Goto Forum:
  


Current Time: Sat Apr 27 03:35:23 GMT 2024

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

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

Back to the top