Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Xpand Workflow file
Xpand Workflow file [message #1021702] Wed, 20 March 2013 14:39
serhat gezgin is currently offline serhat gezginFriend
Messages: 243
Registered: January 2013
Location: Izmir
Senior Member

I have problem with workflow. when i write this (by default)

	<property name="model" value="file:///C:\\Users\\unituser\\Desktop\\default.filesystem" />
	<property name="src-gen" value="file:///C:\\Users\\unituser\\Desktop\\" />
	<!-- set up EMF for standalone execution -->
	<bean class="org.eclipse.emf.mwe.utils.StandaloneSetup" >
		<platformUri value=".."/>
	<!-- instantiate metamodel -->
	<bean id="mm_emf" class="org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel"/>
	<!-- load model and store it in slot 'model' -->
	<component class="org.eclipse.emf.mwe.utils.Reader">
		<uri value="${model}" />
		<modelSlot value="model" />
		<!-- check model -->
	<component class="org.eclipse.xtend.check.CheckComponent">
		<metaModel idRef="mm_emf"/>
		<checkFile value="metamodel::Checks" />
		<emfAllChildrenSlot value="model" />

	<!--  generate code -->
	<component class="org.eclipse.xpand2.Generator">
		<metaModel idRef="mm_emf"/>
			value="template::Template::main FOR model" />
		<outlet path="${src-gen}" >
			<postprocessor class="org.eclipse.xpand2.output.JavaBeautifier" />

workflow gives me;

org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'filesystem' not found.

So i must write my model xsi:schemaLocation="filesystem metamodel/filesystem.ecore";

But how can i this done this code generation without xsi:schemaLocation ?

Because i know where is the metamodel and i want to give this info to workflow not model file.

Can i done this ? in xsd tutorial i can done this with this code;

  <component class="org.eclipse.xtend.typesystem.xsd.XMLReader">
    <modelSlot value="model" />
    <uri value="${modelFile}" />
    <metaModel id="mm"
      <schemaFile value="metamodel/ir.xsd" />
  <component class="org.eclipse.xpand2.Generator">
    <metaModel idRef="mm" />
    <expand value="template::DeepTravelTemplate::Root FOR model" />
    <outlet path="${toPath}" />
    <globalVarDef name="domainModelAbsClases" value="{}"/>
    <globalVarDef name="domainModelAbsAndConcreateClases" value="{}"/>

with this model not need to know the metamodel location. How can i done this with emf models ?
Previous Topic:[Acceleo] Problem calling AcceleoService programatically
Next Topic:[Acceleo] Cannot find the Acceleo perspective after installation
Goto Forum:

Current Time: Mon Jun 25 04:41:42 GMT 2018

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

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

Back to the top