Generating an EMF Model
Top
Previous: Prerequisites
Next: Generate the Model Code
Step 1a: Import the Model from Rose
The Rose file for the library model can be found here:
library.mdl. Save it somewhere on your
workstation.
Create a new Ecore model project in the workspace:
-
Bring up the "File/New/Project..." dialog.
-
Select "Eclipse Modeling framework" and "EMF Project". Click the
"Next" button.
-
Give the project a name, say, "library". Then, click the "Next"
button.
-
Select "Load from a Rose class model" and click the "Next" button.
-
Click on the "Browse" button and locate the Rose model file.
-
The Rose model file will be examined, and a default GenModel name
will be suggested. You can change the name in the entry box if you
wish. Then click the "Next" button.
-
In general, a Rose model may contain more than one package. Select
the package for which you want to generate an EMF model -- in this
case, the only package, "library". Click the "Finish" button.
-
An Ecore model and a GenModel will be created. The GenModel, which
controls code generation for the model, is opened in the main view.
Top
Previous: Prerequisites
Next: Generate the Model Code