Creating an EMF Model using a Graphical Editor
Top
Previous: Creating Associations
Next: Modifying the Model
Step 4: Generating the Model and Editor
-
In the editor view, right-click on the blank area. Select Generate All.
- The first time you do code generation on a project, you will need
to create the GenModel model. The GenModel model is auxiliary to the EMF model. It contains information about
code generation like the directory into which the code is generated and the
adapter pattern.
The GenModel selector will come up. Click
on the New GenModel button.
- Expand the library project and select the model folder. Change the file name to library.genmodel. Click the Finish button.
- You are back in the GenModel selector. Click the OK button and code generation begins.
- When the code generation is finished, the GenModel and the EMF model code for the library project will have been generated. In addition, the library.edit and library.editor projects will have been generated and be ready to execute.
- Switch to a Java perspective or a Debug perspective and then follow Step 4 in the tutorial "Generating an EMF Model" to run the generated editor.
Top
Previous: Creating Associations
Next: Modifying the Model