Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » xtext for metamodeling
xtext for metamodeling [message #484341] Mon, 07 September 2009 01:25
Edwin Park is currently offline Edwin ParkFriend
Messages: 124
Registered: July 2009
Senior Member
Hi,

What is the best way to generate an ecore model from an xtext model? I
want to use xtext to define a metamodel, and then create model instances
that are themselves emf models.

Some portion of my xtext metamodel defines an entity structure that maps
to ecore in a straightforward way. I was originally using xpand to
generate java objects for my xtext model entities, but I found I was
needing to build in features like reflective accessor methods that are
already present in emf. So I'm thinking that rather than using m2t to
instantiate an ecore model from my xtext model, it would be better to use
m2m xtend to do so.

In order to do this, there are a few things I need to know how to do:
1. How do I execute a m2m transformation on a model instance using
xtend? Writing the xtend file is easy, and I also see there is a
XtendComponent workflow component that I'm assuming would do the job; I
just haven't seen any examples of how to wire things up in the mwe
workflow file.
2. How do I write out the generated ecore model once it has been
transformed? I also see there is a org.eclipse.emf.mwe.utils.Writer
workflow component, but again I'm looking for an example of how to wire it
up in the mwe file.

Thanks,
Edwin
Previous Topic:Dynamically call another xtend method from current xtend method
Next Topic:[Acceleo] Code Beautifying
Goto Forum:
  


Current Time: Fri Apr 19 09:13:16 GMT 2024

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

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

Back to the top