Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Go into "File > New > Example... > Eclipse Modeling Framework > Extended Library Model Example"
  2. Select "org.eclipse.emf.examples.library" and press "Finish".
  3. Double click on the extlibrary.ecore file, and you will see an editor with a hierarchical breakdown of the domain model.

    Image Added

Part #2: Relations

Find examples of containment / container and regular relations in the model.


Part #3: Extending the model

Use the model editor to add a new BookCategory. Hint: right-click on BookCategory > New Child... > Select EEnum Literal

Fill out "Literal", "Name" and "Value" properties for our new category.

Image Added

Remember to save our ecore file, after the new category is added.

 

Part #4: Generating Java Code

First we want to validate our ecore model.

Right click on the root element and select "Validate"

Image Added