Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Re: [Validation] ConstraintProvider extension point
Re: [Validation] ConstraintProvider extension point [message #604851] Wed, 18 April 2007 14:39
Eclipse UserFriend
Originally posted by:

Hi, Vincent,

This isn't the correct newsgroup for EMF Validation-related questions. I'm
including 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.



Vincent wrote:

> 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="" is the same as the uri
> definied in my ecore model.
> <extension point="org.eclipse.emf.validation.constraintProviders">
> <category id="constraints.category2"
> mandatory="false"
> name="category2">
> </category>
> <constraintProvider cache="true">
> <package namespaceUri="">
> </package>
> <constraints categories="constraints.category2">
> <constraint
> id="constraints.constraint2"
> lang="OCL"
> mode="Batch"
> name="constraint2"
> severity="ERROR"
> statusCode="11">
> <![CDATA[ > 0 ]]>
> <message>
> message body text
> </message>
> <description>
> description body text
> </description>
> <target
> class="alk_comp.Component">
> </target>
> </constraint>
> </constraints>
> </constraintProvider>
> </extension>
Previous Topic:[Teneo]Problem Persisting GMF diagram to HibernateResource
Next Topic:Re: [Validation] ConstraintProvider extension point
Goto Forum:

Current Time: Tue Jan 19 22:58:17 GMT 2021

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

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

Back to the top