|
Re: GMF with Ecore Constraints [message #179453 is a reply to message #179445] |
Thu, 27 March 2008 19:57 |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, Greg,
You can use the "live" evaluation mode implemented in the validation
framework component to achieve this. Try adding an IValidationListener to
the ModelValidationService. Your listener can look at the ValidationEvent
and, if its mode is EvaluationMode::LIVE, search the IStatus results until
you find one that is an IConstraintStatus with a "target" that is an object
that you can correlate to some field in your data-entry form.
HTH,
Christian
Greg Fox wrote:
> Can someone point me in the right direction for doing validation with GMF.
> I have added constaints to my EMF model using OCL.
>
> What I need is for an error message to be displayed to the user if a
> transaction fails validation. The keyboard focus should go to the field
> where the user entered the error.
>
> Our application is not file based and the X markers are not useful in our
> context. I was thinking that the error message could be shown in a
> tooltip. A popup dialog would be OK, but I don't know how I could get the
> focus back on the field that was being edited in the diagram.
>
> The validation needs to happen automatically for the Transaction and
> cannot require the user to actively request the validation.
>
> Is there a standard way to deal with this in GMF? I have not been able to
> find any clear documentation or tutorials on how to do this.
|
|
|
Powered by
FUDForum. Page generated in 0.03994 seconds