Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Validation Question (hook into EMF Validation command)
Validation Question (hook into EMF Validation command) [message #4637] Mon, 28 November 2005 22:15 Go to next message
Eclipse UserFriend
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 #4706 is a reply to message #4637] Mon, 28 November 2005 23:14 Go to previous messageGo to next message
Eclipse UserFriend
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 #4913 is a reply to message #4706] Tue, 29 November 2005 16:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: zx.us.ibm.com

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 #4981 is a reply to message #4913] Tue, 29 November 2005 22:36 Go to previous messageGo to next message
Eclipse UserFriend
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 #5049 is a reply to message #4981] Wed, 30 November 2005 02:18 Go to previous message
Eclipse UserFriend
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 23:14 Go to previous message
Eclipse UserFriend
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 16:46 Go to previous message
Chris Aniszczyk is currently offline Chris AniszczykFriend
Messages: 674
Registered: July 2009
Senior Member
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 22:36 Go to previous message
Eclipse UserFriend
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] Wed, 30 November 2005 02:18 Go to previous message
Chris Aniszczyk is currently offline Chris AniszczykFriend
Messages: 674
Registered: July 2009
Senior Member
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
Previous Topic:using OCL with other modelling tools
Next Topic:CDO: Oracle JDBC driver
Goto Forum:
  


Current Time: Thu Mar 28 21:36:50 GMT 2024

Powered by FUDForum. Page generated in 0.02481 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top