This example describes the usage of the validation framework within the SDK.
It demonstrates how to specify constraints for the library meta-model and bind the constraints to
the library application context.
Please refer to the document
EMF Validation Framework Examples Overview
for reviewing the library meta-model used as the basis for demonstrating the capabilities in this example.
This example plug-in is named
This plug-in contributes the Validation menu to the library
editor's main menu and context menu. The menu has two items:
Enable Live Validation: This actions registers a
EContentAdapter against the library
Resource to receive
immediate notifications. Within the
notifyChanged callback the model validation service is called to provide a live validation
Validate Elements: This action calls upon the model validation service to provide a batch validation
of the selected
EObjects and their children.
Please refer to the tutorial
for reviewing the code samples within this example
Refer to this example if you need:
- To specify constraints for any EMF meta-model (batch and live constraints)
- To specify custom model traversal algorithms for batch validation
- To specify constraint bindings to application contexts
- To listen to validation events
- To define triggers for evaluation of batch and live constraints
Copyright (c) 2000,2005 IBM Corporation and others. All Rights Reserved.