Quick Start Tutorial

The best way to start a MDE project with OOMEGA is to use metaMODELS.org. This is a platform for collaborative metamodel engineering - launched by OOMEGA in cooperation with Technical University of Munich.

Get template projects from metaMODELS.org

So please setup the connection to metaMODELS.org's SVN repository and check out the template projects.

Repository location: https://svn.metamodels.org/repository
Path to template projects: /Metamodels/_Template/{MetamodelName}/trunk

You should at least check out the following projects from the aforementioned location:

  • org.metamodels.{metamodelname}
  • org.metamodels.{metamodelname}.plugin

Create projects for your metamodel

The template projects serve as a starting point. Please make a copy of them in your Eclipse workspace and name your projects accordingly by replacing the placeholder {metamodelname} with your metamodel's name. Finally please don't forget to disconnect the newly created projects from the SVN repository by choosing "Team > Disconnect...".

Let's assume your metamodel's name is tutorial. You should end up with the following result.

Adjust metamodel project

A few more adjustments need to be done in the project org.metamodels.tutorial:

  1. etc/build.properties
    • Replace the placeholders {metamodelname} and {MetamodelName}. In our example we would enter tutorial and Tutorial.
    • Choose a producer identifier (PID).
    • Choose a range of valid concept identifiers (CIDs). Note: As soon as you want to share your metamodel on metaMODELS.org, we will assign a PID and a CID range to your metamodel.
  2. Change the name of the following folders accordingly
    • src/metamodel/{MetamodelName}.metamodel
    • src/metamodel/{MetamodelName}.metamodel/org/metamodels/{metamodelname}
  3. Adjust the file src/metamodel/{MetamodelName}.metamodel/org/metamodels/{metamodelname}/DemoEntity.model
    • Adjust the package name.
    • Change the CID according to your range of valid CIDs. Take the first CID of your range and enter it within the @entity annotation.

Install OOMEGA-Libraries and build your metamodel

Install OOMEGA-Libraries in your workspace by choosing File > New > Example... and then OOMEGA > Libraries.

Now you can build your metamodel by choosing Run As > Ant Build on the file org.metamodels.tutorial/etc/build.xml. As a result you should notice a file called tutorial.jar in the folder org.metamodels.tutorial.plugin/lib. You should delete the file {metamodelname}.jar in that folder.

Adjust the Plugin project

Then open the file org.metamodels.tutorial.plugin/plugin.xml and make the following adjustments.

  1. Change the ID and Name in the Overview tab
  2. Change the classpath and exported packages in the Runtime tab
    • Remove lib/{metamodelname}.jar and add lib/tutorial.jar
    • Remove the package org.metamodels.{metamodelname}
    • Export the correct packages by clicking the Add... button
  3. Choose org.oomega.metamodel > {MetamodelName} (implementation) and change the id in the Extensions tab

Install the Model workspace and start the Modelling Workbench

Now please install the OOMEGA-Model-Workspace by choosing File > New > Example... and then OOMEGA > Model Workspace. Moreover you should close the template projects.

Afterwards you can start the modelling workbench by clicking on the OOMEGA Model Workspace runtime configuration.

Create a Model Repository, import your metamodel and start modelling

Please select the OOMEGA perspective in the second Eclipse instance. Afterwards you can create a new model repository, e.g. a text-based repository.

  1. Select File > New > Text-based Repository Project and enter e.g. the project name Tutorial.
  2. Select the entry MetamodelFolder Metamodels and choose Metamodel Import > Tutorial in the context menu
  3. Create your first demo entity by choosing Create ... as entry > DemoEntity in the context menu of ModelFolder Models
  4. Select the newly created demo entity and enter Tutorial in the field name of the Properties view

Finally you can open the editor for the entry ModelFolder models, create a new line before the last curly bracket and enter some text. You will notice that the parser instantly creates new demo entities that you can see in the tree view on the left.

Have fun, don't forget to extend your metamodel and share it with others on metaMODELS.org!

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.