DevBooststLogoQualiTunetudLogorewerseLogo modelplexLogo
Refactory Logo
EMFText Refactoring SDK
Enabling Refactorings for your DSL just became a piece of cake

Contents

Enable a refactoring in your DSL of choice

With Refactory model refactorings are defined in a generic way so that the core, consisting of the participating elements and the transformation steps, can be reused in different target metamodels. To enable generic refactorings in your metamodel of choice you just have to define a mapping from the defined roles into your metamodel.

The dialog to create a new mapping file can be invoked with File -> New -> Other.... Then choose EMFText .rolemapping file in the Refactory category.

As depicted in the following figure you first have to reference your target metamodel. Then you have to specify a name which will be displayed in the context menu of your model editors. Furthermore the desired role model must be referenced.

Image:rolemapping.png

As you can see above you just have to map the defined roles and the collaborations between them to metaclasses and relations in your target metamodel. Once such a mapping has been specified a context menu entry will be added in your model editors which then executes the refactoring wizard.

CS Specification

rolemapping.cs

Metamodel

rolemapping.ecore

rolemapping.genmodel

Plugins

org.emftext.language.refactoring.rolemapping

org.emftext.language.refactoring.rolemapping.resource.rolemapping

org.emftext.language.refactoring.rolemapping.resource.rolemapping.ui

org.emftext.language.refactoring.rolemapping.postprocessing

Retrieved from "http://www.emftext.org/index.php/Refactoring:RoleMapping"

This page has been accessed 1,156 times. This page was last modified 15:44, 8 November 2010.