|Re: [Validation] ConstraintProvider extension point [message #80327]
||Wed, 18 April 2007 14:39
Originally posted by: cdamus.ca.ibm.com|
This isn't the correct newsgroup for EMF Validation-related questions. I'm
including eclipse.technology.emft for the benefit of other validation
After you run validation, do you see any entries in the workspace log file?
Perhaps something indicating that the target EClass "alk_comp.Component"
could not be resolved?
Otherwise, I would check whether GMF perhaps generates a clientContext for
which you would need to define a binding on the
org.eclipse.emf.validation.constraintBindings extension point, to bind your
constraint category to that context.
> Hi everyone,
> I'm developing a GMF editor which already use OCL constraints to validate
> the diagram. It uses Audit Rules which work fine.
> I would like to separate the definition of those rules from the editor
> code. So I created a new plugin, declaring the constraintProvider
> extension point, as it was previously defined in my GMF editor.
> By now I can see those new rules in the Preference page (under Model
> validation -> Constraints), but when I validate my diagram nothing
> happens, no constraint is called by the batch validator.
> Did I forget something ?
> Thanks in advance.
> Here is my constraintprovider extension :
> N.B. namespaceUri="http://www.exemple.com/" is the same as the uri
> definied in my ecore model.
> <extension point="org.eclipse.emf.validation.constraintProviders">
> <category id="constraints.category2"
> <constraintProvider cache="true">
> <package namespaceUri="http://www.exemple.com/">
> <constraints categories="constraints.category2">
> <![CDATA[ self.name.size() > 0 ]]>
> message body text
> description body text
Powered by FUDForum
. Page generated in 0.01337 seconds