Generating an EMF Model

This tutorial is a step-by-step description of the process of creating an EMF model and generating a simple model editor for it. Following this tutorial will show how easy EMF makes it to go from a simple model definition to a fully functioning editor for that model.

The screenshots are based on version 2.1 of the Eclipse SDK and version 1.0.2 (build 20030322_1237VL) of EMF.

The model we will generate looks like this in UML (see the "Eclipse Modeling Framework Overview" paper for a description of this model):

Library UML model

We will show how an EMF model can be generated from either of two different sources: a Rational Rose model or a set of annotated Java interfaces and classes.

Contents

Step 0: Prerequisites
Step 1: Import the Model from Rose or Define the Model Using Annotated Java
Step 2: Generate the EMF Model Code
Step 3: Generate an Editor for the Model
Step 4: Run the Generated Editor


Next: Prerequisites