- Define a Java Constraint checking that a library has a minimum of books
- Define an Ocl Constraint checking that a book has more than 0 pages
- create the plug-in
- contribute to the following extension point org.eclipse.emf.validation.constraintProviders in plugin.xml
- Launch your eclipse-runtime
- Open Window > Preferences
- Select Model Validation > Constraints
- Verify that there is a category named "Library Example Validation Category"
- Verify that there is a rule named "minimum.books"
- Verify that there is a rule named "minimum.pages"
- Create the following model Library Book
- Right Click on model in the Model Explorer View> Validation > Validate model
- Verify that you have the warning messages in the model Validation view