matthias
matthias

Reputation: 2062

Ecore modification

I have an Ecore model saved to file. What I want to do is to modify the Ecore model (add elements, supertypes, attributs, delete attributes...)

But I don't want to do it by hand, I want a script / M2M transformation.

What language, tool would you use ?

Upvotes: 1

Views: 146

Answers (3)

Chris Gerken
Chris Gerken

Reputation: 16392

Since you're writing a model-to-model transform you should use Java as nothing beats Java for the sorts of navigations, iterations and fine-grained access that you'll need. If you wanted to generate code from the model I'd suggest one of the templating languages, however.

Upvotes: 0

Maverik
Maverik

Reputation: 2398

Can you be more precise please?

I understood you want to modify your source model, however I suppose you want to do it accordingly to some rules. Is that true? Can you exemplify these rules?

That said, I would recommend you to start with Epsilon. It is a powerful language which allows you to define a variety of model-to-model and model-to-text transformations.

Upvotes: 0

sbegaudeau
sbegaudeau

Reputation: 1544

What you want is transform your Ecore model into another Ecore model. You should have a look at the model transformation projects of the Eclipse Foundation. I would recommend ATL among those projects as it's easy to master for your need (you do not seems to need very complex transformations). If you need a really simple transformation, I'll suggest doing it directly in Java as it may be easier for your to integrate it in your workflow.

Full disclosure: I work for one of the company contributing to ATL.

Upvotes: 1

Related Questions