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 #80327] Wed, 18 April 2007 14:39 Go to next message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Vincent,

This isn't the correct newsgroup for EMF Validation-related questions. I'm
including eclipse.technology.emft for the benefit of other validation
users.

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.

HTH,

Christian


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="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"
> mandatory="false"
> name="category2">
> </category>
> <constraintProvider cache="true">
> <package namespaceUri="http://www.exemple.com/">
> </package>
> <constraints categories="constraints.category2">
> <constraint
> id="constraints.constraint2"
> lang="OCL"
> mode="Batch"
> name="constraint2"
> severity="ERROR"
> statusCode="11">
> <![CDATA[ self.name.size() > 0 ]]>
> <message>
> message body text
> </message>
> <description>
> description body text
> </description>
> <target
> class="alk_comp.Component">
> </target>
> </constraint>
> </constraints>
> </constraintProvider>
> </extension>
Re: [Validation] ConstraintProvider extension point [message #80364 is a reply to message #80327] Wed, 18 April 2007 14:53 Go to previous message
Eclipse UserFriend
Originally posted by: vincent.legloahec.gmail.com

Hi Christian, thanks for the reply.

I will check eclipe logs and examine the constraintBinding extension, and
also post following messages to the emf newsgroup !
Re: [Validation] ConstraintProvider extension point [message #604863 is a reply to message #80327] Wed, 18 April 2007 14:53 Go to previous message
vincent is currently offline vincentFriend
Messages: 3
Registered: July 2009
Junior Member
Hi Christian, thanks for the reply.

I will check eclipe logs and examine the constraintBinding extension, and
also post following messages to the emf newsgroup !
Previous Topic:Re: [Validation] ConstraintProvider extension point
Next Topic:[Teneo]Cannot create mappings for emf's XMLNamespace model
Goto Forum:
  


Current Time: Mon Jan 18 08:28:41 GMT 2021

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

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

Back to the top