Chapter 13. Example—Implementing a Model and Editor

Now that you are familiar with the capabilities of the EMF generator, it’s time to look at a more elaborate example. In this chapter we generate the ExtendedPO2 model, which includes some common real-world features that require special treatment when generating with EMF. They include:

  1. References that do not require proxy resolution.
  2. Volatile attributes and references.
  3. Custom data types.
  4. References with a restricted set of valid targets.

We show how these features can be implemented using a combination of generator control options and custom implementation in the generated classes. We then consider an alternative design, ExtendedPO3, which uses multiple packages to implement the same model. ...

Get EMF: Eclipse Modeling Framework Second Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.