[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [henshin-dev] Loading UML-Models into Henshin

Hi Christian,

thank you for your fast response. You got me absolutely right: I want to load UML model instances into henshin. Your hint to use the EMF model importer seems to work for me.


Am 13.03.2012 21:07, schrieb Christian Krause:
Hi Simon,

the UML2 tools in Eclipse are based on a UML2 metamodel defined in EMF. That means, the UML metaclasses are defined in an Ecore file. You can load this model in Henshin and define transformation for it. Just click "Import Packages -> From registry" and enter "*uml" and choose the last URI.

Unforunately, this is not what you want. What you will get is that you will see the UML2 metaclasses in the palette in the graphical editor and you will be able to define a transformation on that meta-level. Then you could apply the transformation to a *.uml model and transform this UML model.

What you want is one level down. You want to import packages from *.uml models and transform instances over these UML models. I am afraid, this is currently not possible with Henshin.

Generating an Ecore file from a UML could work. I have never tried it, but you could experiment with the model import facilities in EMF. For that, open the "New..." wizard and select "Eclipse Modeling Framework -> EMF Project" and try out the UML model importer.

If this does not work, you could in principle also define a Henshin transformation to convert UML models to Ecore models (should be a fairly simple one-to-one transformation).

Hope that helps.


On 03/13/2012 05:22 PM, Max Mustermann wrote:


I would like to use the Henshin-Editor just for creating transformation rules visually. I wondered if I could be possible to load UML models instead of Ecore models. I thought this could be possible because the UML models from org.eclipse.uml2.uml are described in Ecore. So I created an action to import .uml files but then I couldn't assign a UML type to a henshin node.

My question: is there a way to use a UML model as a meta model in henshin? I don't want to make any changes to the henshin ecore model or its sources (only by using inheritance/extension points)

If this is not possible I think it could be an approach to transform a UML model to a Ecore model before loading it into Henshin.


henshin-dev mailing list