Creating an EMF 1.1 Model using a Graphical Editor

In the previous tutorials, we showed you how to create EMF models by importing Rose models or annotated Java interfaces. This may have seemed like a somewhat indirect way of creating a model in EMF. In this tutorial, we will show you how to create the Library model from scratch using a graphical editor that manipulates the EMF model directly. An EMF model file has the extension .ecore and therefore sometimes referred to as an ecore model.

The graphical editor is provided by Omondo through their EclipseUML plugin. The following is the class diagram of the Library model we dealt with in the first tutorial shown in Omondo graphics and icons.
     

The screenshots in this tutorial were captured using version 2.1 of the Eclipse SDK, version 1.1.0 (build 20030519_0521VL) of EMF, version 2.1.0 of GEF, and version 1.2.1 of EclipseUML.

Contents

Step 0: Prerequisites
Step 1: Creating a New Model
Step 2: Creating Classes
Step 3: Creating Associations
Step 4: Generating the Model and Editor
Step 5:
Modifying the Model


 contents

Step 0: Prerequisites

Download and install the latest EclipseUML plugin from the Omondo web site (http://www.omondo.com/) and its dependent plugins. The screenshots below were captured when version 1.2.1 was available, but you should use the latest version you find on the Omondo web site.


 contents

Step 1: Creating a New Model

We first create a Java project and then use the wizard to create a new EMF model.


 contents

Step 2: Creating Classes


 contents

Step 3: Creating Associations


 contents

Step 4: Generating the Model and Editor


 contents

Step 5: Modifying the Model

When you modify the EMF model in the graphical editor, it will sychronize the changes with the corresponding GenModel model.


contents