using acceleo to M2M [message #676237] |
Fri, 03 June 2011 10:54  |
smaoui asma Messages: 49 Registered: July 2009 Location: Paris Saclay, France |
Member |
|
|
Hello,
I have a uml model (MyModel.uml) that contains: class + state machine + activity diagrams. I waould like to transform my model to another model (MyModel.ggraph(not uml) which is conform to an ecore metamodel (Ggraph.ecore) that I created using EMF tools. I generated code related to my metamodel (EMF genmodel) to edit and create my instance model by hand (after running another eclipse instance).
what I would like to do, is to generate MyModel.ggraph automatically from the UML model and not manually using the GGraph Editor that EMF do generate.
I am aware that it is M2M and not M2T (I have both metamodel : uml2 and ggraph as well as my uml model, so I can use ATL, QVT to generate my ggraph model) but I have not enough time to learn a M2M tranfo tool, I used Acceleo for many projects to transfrom uml models to java, c++ and other text formats, so my question is can I use acceleo for this kind of transfo ? if yes, should I create resources ? can I do it using java ( a plugin that I run on uml model to produce ggraph model) ?
thank you very much
Asma
|
|
|
Re: using acceleo to M2M [message #676322 is a reply to message #676237] |
Fri, 03 June 2011 16:37   |
Ed Merks Messages: 32833 Registered: July 2009 |
Senior Member |
|
|
Asma,
Sure you could use any template language to produce a correct XMI/XML
serialization of your ggraph model and stuff those results into a
*.ggraph resource, but seems quite a complicated way of doing it. You
don't have to use a transformation language; you could just use the Java
APIs for the two models (much like we do in XSDEcoreBuilder and
EcoreSchemaBuilder to transform *.xsd to *.ecore or *.ecore to *.xsd).
charfi asma wrote:
> Hello,
> I have a uml model (MyModel.uml) that contains: class + state machine
> + activity diagrams. I waould like to transform my model to another
> model (MyModel.ggraph(not uml) which is conform to an ecore metamodel
> (Ggraph.ecore) that I created using EMF tools. I generated code
> related to my metamodel (EMF genmodel) to edit and create my instance
> model by hand (after running another eclipse instance). what I would
> like to do, is to generate MyModel.ggraph automatically from the UML
> model and not manually using the GGraph Editor that EMF do generate.
>
> I am aware that it is M2M and not M2T (I have both metamodel : uml2
> and ggraph as well as my uml model, so I can use ATL, QVT to generate
> my ggraph model) but I have not enough time to learn a M2M tranfo
> tool, I used Acceleo for many projects to transfrom uml models to
> java, c++ and other text formats, so my question is can I use acceleo
> for this kind of transfo ? if yes, should I create resources ? can I
> do it using java ( a plugin that I run on uml model to produce ggraph
> model) ?
>
> thank you very much
>
> Asma
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Powered by
FUDForum. Page generated in 0.01657 seconds