Chapter 7 Working with Eclipse


Generating EMF implementation classes

Steps To use the EMF code generator to generate the implementation classes:

  1. Start Eclipse.
  2. If the project already exists, you can right click the project and select Refresh. If it is a new project, you need to import the generated project: Select File→Import, select Existing project into workspace, select the generated directory name in the directory browser.
  3. Right-click the .genmodel file and select Open with → EMF Generator to open the file. You can see a tree view that shows the contents of the Ecore model.
  4. Right-click the root of the tree view and select Generate All.

    The EMF code generator will create three projects: the model project, the edit project and the editor project and will compile them.
  5. Use the generated classes in your own application.

    For more information on how to use the generated classes and the editor, see the EMF documentation.

Notes

 


Copyright (C) 2006. Sybase Inc. All rights reserved.