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