Skip to content
  Kermeta  

Getting started with Kermeta 2

Document Actions
Short introduction to the workbench of Kermeta 2

This document provides some short step by step instructions to that introduce to the workbench of Kermeta 2.

Prerequisite :

Kermeta 2 is installed in Eclipse, Eclipse is configured to use a JDK 1.5 minimun


Create and run a simple HelloWorld

In eclipse do the following :

  • File>new>Kermeta project,  name it HelloWorld
  • right click on the .kp file Run as
  • Create a Kermeta configuration (rename it "HelloWorld kermeta run"), run it
  • Later, you can re-run it directly using the Eclipse run menu.

Consoles

You can see what happen by looking in the various Kermeta consoles. You can switch between consoles using a button on the top rigth corner.

  • builder console for build messages,
  • runner console for run messages,
  • default console for various messages (typically some build or run messages that are still not correctly catched by the builder or runner consoles)

The level of details can be customized in the preferences.

Understanding target folder content

During the build process, you'll notice that it creates a "target" folder. It contains all the output of kermeta : 

  • the intermediate kermeta model produced when importing various sources (ecore2km for example)
  • the merged model (useful as a substitute of the outline when checking what is available in your program and controling how they where merged (framework, required classes, ...)
  • the generated java code of ecore models (if any).
  • the generated scala code of the application
  • the resulting bytecode

More complete samples

You can install more complete samples:

  • File>new> example > Kermeta   then select one of the available sample

List of currently deployed samples :

  • class2rdbms : presents a full model transformation, the ecore models are dealed directly by kermeta itself, present a sample of pom.xml that allow to build and package the code in a jar using maven.