|
|
|
Re: Standalone EMF validation not registering constraints [message #660451 is a reply to message #660353] |
Fri, 18 March 2011 13:35 |
Ed Merks Messages: 33113 Registered: July 2009 |
Senior Member |
|
|
Surekha,
Comments below.
ssaharan@cisco.com wrote:
> Okay let me ask my question again more clearly:
> I am trying to invoke EMF Validation from a standalone jar i.e. it is
> not being used from within eclipse or eclipse RCP.
So everything that's normally done via extension registrations in the
plugin.xmls will need to be done manually.
> I have a main method in one of my class from which I am invoking
> Validation using this code:
> // Invoke validation framework as usual
> IBatchValidator validator = (IBatchValidator)
> ModelValidationService.getInstance().newValidator(Evaluation Mode.BATCH);
> validator.setIncludeLiveConstraints(true);
> IStatus status = validator.validate(objs); // where objs is my
> EObjects to be validated
>
> If I do System.out.println(status), I get "Status OK:
> org.eclipse.emf.validation code=10 No constraints were evaluated.
> null" even though Validation error is there.
> While trying to investigate the issue, I found this post
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=167972 where it is
> stated that EMF Validation 1.4.0 provides standalone support. My
> question is how to use modeledConstraintProviders extension point to
> get the constraints registered ? An example will be helpful as to what
> should be the ConstraintResourceURI in the extension point and the
> class it will define?
I don't know the answer and I'm not sure anyone who does pays attention
to the newsgroup anymore. Wouldn't it be much easier to run a headless
Eclipse instance so that your extensions just work?
>
> Thanks,
> Surekha
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02191 seconds