Run the Library Editor
To run the Library Editor go to step 4 of the EMF Library tutorials (Run the generated Editor). For the EMF Library tutorial see: (based on Rose, based on Xml Schema).
You can now for example add a writer and book. Note that when creating a Book instance the category has to be changed from its default value to something else. This is required because emf assumes that when the default value is set in the category feature that it has not been set (while it is a mandatory feature). See also this bugzilla here..
After adding a Library and a Writer and a Book you can to save the resource. The database library now contains a Library, a Book and a Writer.
Note that the model constraints are checked when saving EMF objects. Validation errors (e.g. non-nullable fields are not set) are made visible in the Eclipse Error Log view (see menu Window > Show View > Error Log). When one of the EMF objects is invalid then the complete save action is rolled back.
You can try the following editor actions:
- Create Writers and Books, link them
- Link Writer to multiple Books
- Copy and paste of one or multiple Writers and Books
- Delete of a Book if it has no Writer
- Delete of a Writer if it has no Books
Cut and paste is not directly supported, see here for more information and a solution.