Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Two models in a transformation
Two models in a transformation [message #525991] Thu, 08 April 2010 13:42 Go to next message
Fy Za is currently offline Fy ZaFriend
Messages: 245
Registered: March 2010
Senior Member
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 15:57 Go to previous messageGo to next message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 762
Registered: July 2009
Location: Dortmund, Germany
Senior Member

	<!-- 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


Need professional support for Xtext, EMF, Eclipse IDE?
Go to: http://devhub.karakun.com
Twitter : @kthoms
Blog : www.karsten-thoms.de
Re: Two models in a transformation [message #526186 is a reply to message #526075] Fri, 09 April 2010 07:49 Go to previous message
Fy Za is currently offline Fy ZaFriend
Messages: 245
Registered: March 2010
Senior Member
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: Thu Apr 18 01:42:55 GMT 2024

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

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

Back to the top