| modeltype GMFMAP uses mappings('http://www.eclipse.org/gmf/2006/mappings'); |
| modeltype GMFGEN uses gmfgen('http://www.eclipse.org/gmf/2009/GenModel'); |
| modeltype GENMODEL uses genmodel('http://www.eclipse.org/emf/2002/GenModel'); |
| |
| transformation Map2Gen(in mapModel : GMFMAP, in domainGenModel : GENMODEL, in diagramRuntumeGenModel : GENMODEL, out gmfgenModel : GMFGEN); |
| |
| configuration property rcp : Boolean; |
| configuration property useMapMode : Boolean; |
| configuration property useFullRunTime : Boolean; |
| |
| main() { |
| var mapRoot := mapModel.rootObjects()![GMFMAP::Mapping]; |
| var genEditor := mapRoot.map process(); |
| -- 1. (+) structure (NodeMapping -> GenNode, LinkMapping -> GenLink), labels |
| -- 2. (*) visual id |
| -- 3. (*) viewmaps |
| -- 4. (+) navigator |
| -- 5. (+) parsers |
| -- 6. (+) palette |
| -- 7. (+) propertysheet |
| -- 8. (+) diagram runtime model |
| -- 9. (+) genmodel and ElementTypes (not part of the structure step?) |
| -- 10. (+) Audits and Metrics |
| -- 11. (+) Preference pages |
| -- 12. (*) Actions |
| -- 13. (-) RCP |
| } |
| |
| -- 1. Can I define an imperative operation (like main), not a helper or query? |
| -- 2. access and new for a transformation are supported? (spec: 8.1.11 Composing Transformation) |
| -- 3. Dot within a comment gives codecompletion |
| |
| mapping GMFMAP::Mapping::process() : GMFGEN::GenEditorGenerator@gmfgenModel { |
| copyrightText := 'FROM QVTO TRANSFORMATION'; |
| diagram := object GenDiagram {}; |
| modelID := rcp.repr() + useMapMode.repr() + useFullRunTime.repr(); |
| } |