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

Contents

Define the transformation steps

The second step to specify a refactoring generically is to define the model transformation. Since this transformation must be reused in arbitrary metamodels it has to be independent from the target domains. Hence we developed a small role-based transformation language for specifying the model modifications only based on those roles which have been defined to create a dedicated context for a model refactoring.

For creating a new refactoring specification just invoke File -> New -> Other... and choose EMFText .refspec file in the Refactory category. Then you have to refer the role model, for which the specification is intended to be defined, and formulate the transformation steps as can be seen in the next figure.

Image:refspec.png

In the upper part of this figure some variable declarations can be seen. The transformation itself consists of the last five instructions which only refer to defined roles and variables.

CS Specification

refactoring_specification.cs

Metamodel

refactoring_specification.ecore

refactoring_specification.genmodel

Plugins

org.emftext.language.refactoring.specification

org.emftext.language.refactoring.specification.resource.refspec

org.emftext.language.refactoring.specification.resource.refspec.ui


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

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