[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[mdt-ocl.dev] Complete OCL and custom message support
|
Hi Guys
I've just done a major examples commit so that we now have support for
Complete OCL editing with semantic validation/feedback
Complete OCL evaluation
Complete OCL validation
Complete OCL can therefore be used as a definition language for Xtext
validation giving users a three way Java/CHECKS/Complete OCL choice for
model enhancement. Only Complete OCL provides a tool-independent
solution that is re-useable outside the Xtext environment.
-----------------
I've supported OCL defined validation failure messages:
In Ecore: augment the 'MyConstraint' key and its Boolean-valued OCL
expression by an 'MyConstraint$message' key and a String-valued OCL
expression.
In OCLinEcore: put the message expression in parentheses
invariant MyConstraint('my message') : myCheck();
In Complete OCL: put the message expression in parentheses
inv MyConstraint('my message') : myCheck()
--------------------
OclAny::oclType() now returns Classifier that is a Pivot Model Class, so
message expressions can exploit reflection. (There seems to be no
difference between 'UML' Type, Classifier and Class once Complete OCL
has required all types to be extensible, so unifying these names is a
round-tu-it.)
--------------------
Pending a resolution of EMF Bug 337792, the in-Ecore message
functionality requires generated Validators to inherit
OCLinEcoreEObjectValidator rather than EObjectValidator. To get message
support for dynamic models the registration of a default
EObjectValidator for 'null' must be replaced by a default
OCLinEcoreEObjectValidator.
Complete OCL validation is enabled by registering a
CompleteOCLEObjectValidator for the package. At the moment I do this
from an Xtext JavaValidator, but one day it should be auto-generated by
a CompleteOCLValidatorFragment.
--------------------
This provides the Xtext environment that I've been wanting for the
EclipseCon tutorial, so apart from minor bug-fixing, I don't plan to do
much more before EclipseCon. If CQ4866 progresses, I may be able to
commit the revised Console with Complete OCL support.
Any feedback on the useability of editors in the latest build very welcome.
Regards
Ed Willink