| transformation mapkeyword; |
| |
| modeltype ECORE uses 'http://www.eclipse.org/emf/2002/Ecore'; |
| |
| mapping main(in model: ecore::EPackage): ecore::EPackage { |
| name := model.name; |
| eSubpackages += model.foo('1'); |
| eSubpackages += model.map foo('2'); |
| eSubpackages += model.xmap foo('3'); |
| eSubpackages += bar('1'); |
| eSubpackages += map bar('2'); |
| eSubpackages += xmap bar('3'); |
| } |
| |
| mapping ecore::EPackage::foo(in suffix : String) : ecore::EPackage { |
| name := 'foo' + suffix; |
| } |
| |
| mapping bar(in suffix : String) : ecore::EPackage { |
| name := 'bar' + suffix; |
| } |
| |
| |
| |