Skip to main content
Jump to: navigation, search

Henshin/Graphical Editor

< Henshin
Revision as of 15:50, 5 March 2010 by Unnamed Poltroon (Talk) (Initial contribution)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Model transformations in Henshin are defined using matched transformation rules. There are currently two rules editors available: a tree-based editor (EMF) and a graphical one (GMF). A screenshot of a simple, but not very meaningful, transformation rule in both editors is shown below.

Henshin example transformation rule.png

The rule is called Test and it matches two object, one of type Library and one of type Writer. Additionally, the writer instance must be contained in the library instance via the writers containment reference, and its name attribute must be set to "Smith". The last condition that must be fulfilled for that rule to be applicable is that the library instance must not contain a instance of type Book in its books containment reference.

If these conditions are all fulfilled, the rule can be applied. It performs the following actions in an atomic step: delete the writer instance from the library and create and add a book instance to the library.

Back to the top