Skip to main content



      Home
Home » Modeling » M2T (model-to-text transformation) » Two models in a transformation
Two models in a transformation [message #525991] Thu, 08 April 2010 09:42 Go to next message
Eclipse UserFriend
Hi, I'd know how to combine two models(with their meta-model) in a transformation,
especially : how write in the mwe file?
thanks
Re: Two models in a transformation [message #526075 is a reply to message #525991] Thu, 08 April 2010 11:57 Go to previous messageGo to next message
Eclipse UserFriend
	<!-- load model1 and store it in slot 'model1' -->
	<component class="org.eclipse.emf.mwe.utils.Reader">
		<useSingleGlobalResourceSet value="true" />
		<uri value="platform:/resource/${model1}" />
		<modelSlot value="model1" />
	</component>
	<!-- load model2 and store it in slot 'model2' -->
	<component class="org.eclipse.emf.mwe.utils.Reader">
		<useSingleGlobalResourceSet value="true" />
		<uri value="platform:/resource/${model2}" />
		<modelSlot value="model2" />
	</component>
	<!-- invoke transformation -->
	<component class="org.eclipse.xtend.XtendComponent">
		<metaModel class="org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel/>
		<invoke value="path::to::ExtensionFile::transformFunction(model1,model2)" />
		<outputSlot value="transformedModel" />
	</component>


Kind regards,
~Karsten
Re: Two models in a transformation [message #526186 is a reply to message #526075] Fri, 09 April 2010 03:49 Go to previous message
Eclipse UserFriend
thank you karsten,
but I'd like to do a transformation from Model to text ( not to model).
so my input is two models and my output is a text.
how to do this??
thanks
Previous Topic:Acceleo and TopCased
Next Topic:[Xpand] Guards in templates (Feature request)
Goto Forum:
  


Current Time: Wed Jul 16 02:03:59 EDT 2025

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

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

Back to the top