Xpand Documentation

Xpand Documentation

Xpand Documentation Sven Efftinge, Peter Friese, Arno Hase, Dennis Hübner, Clemens Kadura, Bernd Kolb, Jan Köhnlein, Dieter Moroff, Karsten Thoms, Markus Völter, Patrick Schönbach, Moritz Eysholdt, Steven Reinisch, Darius Jockel, Andre Arnold and contributors Copyright 2004 - 2014 Xpand Documentation 1. Getting Started ........................................................................................................................ 1 1. Xpand Setup ..................................................................................................................... 1 2. Tutorial overview .............................................................................................................. 1 3. Defining an EMF metamodel .............................................................................................. 1 3.1. Creating an EMF project .......................................................................................... 1 3.2. Defining the (meta)model ......................................................................................... 2 4. Generating the EMF tooling ................................................................................................ 5 5. Setting up the generator project ........................................................................................... 8 6. Defining an Example Data Model ....................................................................................... 10 7. Using Dynamic EMF ....................................................................................................... 12 8. Generating code from the example model ............................................................................ 13 8.1. The workflow definition ......................................................................................... 13 8.2. Running the workflow ........................................................................................... 13 8.3. Templates ............................................................................................................ 15 8.4. Running the generator again .................................................................................... 16 9. Checking Constraints with the Check Language .................................................................... 17 9.1. Defining the constraint ........................................................................................... 17 9.2. Integration into the workflow file ............................................................................. 17 10. Extensions .................................................................................................................... 18 10.1. Expression Extensions .......................................................................................... 18 10.2. Java Extensions ................................................................................................... 18 I. Reference ................................................................................................................................ 21 2. Xpand / Xtend / Check Reference ..................................................................................... 22 1. Introduction ............................................................................................................ 22 2. Type System .......................................................................................................... 22 2.1. Types .......................................................................................................... 22 2.2. Built-In Types .............................................................................................. 23 2.3. Metamodel Implementations (also known as Meta-Metamodels) ............................. 24 2.4. Using different Metamodel implementations (also known as Meta-Metamodels) ......... 25 2.5. Metamodel Reference .................................................................................... 27 3. Expressions ............................................................................................................ 30 3.1. Literals and special operators for built-in types ................................................... 30 3.2. Special Collection operations ........................................................................... 32 3.3. if expression ............................................................................................... 34 3.4. switch expression ....................................................................................... 34 3.5. Chain expression ........................................................................................... 34 3.6. new expression ............................................................................................. 35 3.7. 'GLOBALVAR' expression ............................................................................. 35 3.8. Multi methods (multiple dispatch) .................................................................... 35 3.9. Casting ........................................................................................................ 36 3.10. Xpand keywords and metamodel properties ...................................................... 36 4. Check .................................................................................................................... 36 4.1. Description of the Check language ................................................................... 36 4.2. The workflow component CheckComponent ....................................................... 37 5. Xtend ..................................................................................................................... 37 5.1. Xtend files ................................................................................................... 37 5.2. Comments .................................................................................................... 38 5.3. Import Statements ......................................................................................... 38 5.4. Extension Import Statement ............................................................................ 38 5.5. Extensions ................................................................................................... 38 5.6. Java Extensions ............................................................................................ 40 5.7. Create Extensions (Model Transformation) ........................................................ 41 5.8. Calling Extensions From Java ......................................................................... 42 5.9. WorkflowComponent ..................................................................................... 43 5.10. Aspect-Oriented Programming in Xtend ........................................................... 43 6. Xpand2 .................................................................................................................. 46 6.1. Template files and encoding ............................................................................ 46 6.2. General structure of template files .................................................................... 46 iii Xpand Documentation 6.3. Statements of the Xpand language .................................................................... 46 6.4. Aspect-Oriented Programming in Xpand ............................................................ 52 6.5. Generator Workflow Component ...................................................................... 53 6.6. Example for using Aspect-Oriented Programming in Xpand .................................. 58 6.7. The Problem ................................................................................................ 58 6.8. Example ...................................................................................................... 58 6.9. More Aspect Orientation ................................................................................ 59 7. Profiler .................................................................................................................. 60 3. Built-in types API documentation .................................................................................... 62 1. Object ................................................................................................................ 62 2. String ................................................................................................................ 62 3. Integer .............................................................................................................. 63 4. Boolean .............................................................................................................. 64 5. Real .................................................................................................................... 64 6. Collection ......................................................................................................... 65 7. List .................................................................................................................... 66 8. Set ...................................................................................................................... 66 9. xpand2::Type ..................................................................................................... 66 10. xpand2::Feature ............................................................................................. 67 11. xpand2::Property ..........................................................................................

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    124 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us