Validation Question (hook into EMF Validation command) [message #4637] |
Mon, 28 November 2005 17:15  |
Eclipse User |
|
|
|
Originally posted by: zx.us.ibm.com
So, I have some spiffy constraints written for my EMF model.
It works fine when I run it through live validation. However, I want to
tie it in to the EMF "Validate" command you find on editors (so I can
get the damn errors/warnings markers).
I think the EXTLibrary editor must do something special to get this to
work because when I run validate on my model using the base EMF Validate
action, I get no errors (when there are clearly errors).
Any ideas here?
Cheers,
~ Chris
|
|
|
|
|
|
Re: Validation Question (hook into EMF Validation command) [message #5049 is a reply to message #4981] |
Tue, 29 November 2005 21:18  |
Eclipse User |
|
|
|
Originally posted by: zx.us.ibm.com
Christian W. Damus wrote:
> Hi, Chris,
>
> Did you configure your IBatchValidator to setIncludeLiveConstraints(true)?
>
> I think that, by default, it does not run live constraints.
Of course :)
Do I need to do anything special, I copied most of the code that was
relevant from the adapter example (EValidatorAdapter, Startup) and made
the necessary changes (ie., use my package).
Cheers,
~ Chris
|
|
|
Re: Validation Question (hook into EMF Validation command) [message #561643 is a reply to message #4637] |
Mon, 28 November 2005 18:14  |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, Chris,
You're exactly right: the EXTLibrary editor does something special: it
implements a Validator and registers it with EMF. The custom Validator
delegates to the EMFT ModelValidationService.
Have a look at the EValidatorAdapter class in the
org.eclipse.emf.validation.examples.adapter plug-in.
HTH,
Christian
Chris Aniszczyk wrote:
> So, I have some spiffy constraints written for my EMF model.
>
> It works fine when I run it through live validation. However, I want to
> tie it in to the EMF "Validate" command you find on editors (so I can
> get the damn errors/warnings markers).
>
> I think the EXTLibrary editor must do something special to get this to
> work because when I run validate on my model using the base EMF Validate
> action, I get no errors (when there are clearly errors).
>
> Any ideas here?
>
> Cheers,
>
> ~ Chris
|
|
|
Re: Validation Question (hook into EMF Validation command) [message #561711 is a reply to message #4706] |
Tue, 29 November 2005 11:46  |
Eclipse User |
|
|
|
Thanks Christian.
I made the change so the delegation is successful (I can trace through
the code and see the validation happen).
The only problem is, none of the constraints I have provided are
processed through the validation (currently only one live constraint).
I know the constraint is active because I have a GMF editor with live
constraints enabled and it checks the constraint correctly.
Any ideas of what I missed out on?
Cheers,
~ Chris
|
|
|
Re: Validation Question (hook into EMF Validation command) [message #561734 is a reply to message #4913] |
Tue, 29 November 2005 17:36  |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, Chris,
Did you configure your IBatchValidator to setIncludeLiveConstraints(true)?
I think that, by default, it does not run live constraints.
cW
Chris Aniszczyk wrote:
> Thanks Christian.
>
> I made the change so the delegation is successful (I can trace through
> the code and see the validation happen).
>
> The only problem is, none of the constraints I have provided are
> processed through the validation (currently only one live constraint).
>
> I know the constraint is active because I have a GMF editor with live
> constraints enabled and it checks the constraint correctly.
>
> Any ideas of what I missed out on?
>
> Cheers,
>
> ~ Chris
|
|
|
Re: Validation Question (hook into EMF Validation command) [message #561752 is a reply to message #4981] |
Tue, 29 November 2005 21:18  |
Eclipse User |
|
|
|
Christian W. Damus wrote:
> Hi, Chris,
>
> Did you configure your IBatchValidator to setIncludeLiveConstraints(true)?
>
> I think that, by default, it does not run live constraints.
Of course :)
Do I need to do anything special, I copied most of the code that was
relevant from the adapter example (EValidatorAdapter, Startup) and made
the necessary changes (ie., use my package).
Cheers,
~ Chris
|
|
|
Powered by
FUDForum. Page generated in 0.04401 seconds