Model Refactoring in EMF editors

In this post we demonstrated how EWL from the Epsilon GMT component can be used to automate model refactoring (in-place model transformation in general) in GMF-based editors. Since version 1.3.2, the same wizards can be executed in EMF tree-based editors as well. The following screenshots demonstrate the application of the CreateAssociationClassCase1 wizard (originally described by Ed Merks here) in the default ECore tree-based editor.

The original ECore metamodel:

image

Selecting the classes and applying the wizard:

image

The ECore metamodel after the wizard has executed:

image

2 Responses to “Model Refactoring in EMF editors”

  1. Ed Merks Says:

    Cool!

  2. Dimitrios Kolovos Says:

    Thanks. A glitch I’ve found is that (unlike GMF) the EMF editors do not maintain the order of selection. For example, in the GMF editor when I select B and then A, the wizard title reads “Create association BALink” while in the EMF editor regardless of the user selection order, the selection returned by the tree viewer is always {A, B} and thus the title always reads “Create association ABLink”.

Leave a Reply