edit this page - page history - about editing

Migrating Dynamic Templates to GMF 2.2

GMF provides Dynamic Templates - see Enabling Dynamic Templates in GMF.

Here is a non-exhaustive list of common changes required when migrating GMF 2.0.1 models to GMF 2.2 (as I did). Many of the changes are minor syntax changes, but some of the changes are rewrites of the modelling code behind GMF, so good luck with those Wink

[Original]                 [Change]
editorGen.getElements() -> editorGen.getAllTypedElements()
!=                      -> <>
this                    -> self.repr()
==                      -> =
&&                      -> and
||                      -> or
list.size()             -> list->size()
obj().value == CONST.value -> obj() = CONST

«EXPAND xpt::Common::metaClassAccessor FOR elementType.getMetaClass()»
                        -> getElementType("«elementType.uniqueIdentifier»")

«diagram.editCommandsPackageName».«elementType.getMetaClass().ecoreClass.name»CreateCommand
                        -> «diagram.editCommandsPackageName».«node.createCommandClassName»

«getQualifiedInterfaceName(containmentMetaFeature.genClass)»
                        -> «EXPAND MetaModel::QualifiedClassName FOR containmentMetaFeature.genClass»

Categories: GMF | QVT
edit this page - what links to here? - page history - top
Last edited by jevon jevon 99 months ago