Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » validation using the org.eclipse.emf.validation.constraintProviders extension point
validation using the org.eclipse.emf.validation.constraintProviders extension point [message #597184] Wed, 20 December 2006 07:32
Hallvard Traetteberg is currently offline Hallvard TraettebergFriend
Messages: 672
Registered: July 2009
Location: Trondheim, Norway
Senior Member
I have a constraint that applies to one kind of object (Type) which
may be attached to several kinds of other objects (Variable,
Connection and Computation). I want to evaluate the constraint
whenever this Type object is (re)attached to the relevant Variable,
Connection and Computation objects. Hence, I implemented an
AbstractModelConstraint and declared the constraint using the
extension point.

First I tried the following (notice the multiple targets):

<constraint lang="Java"
class=" no.hal.diamodl.diagram.custom.constraints.ClassTypeConstrain t "
<target class="Variable">
<event name="Set"><feature name="type"/></event>
<target class="Connection">
<event name="Set"><feature name="function"/></event>
<target class="Computation">
<event name="Set"><feature name="function"/></event>

However, the constraint was never evaluated! When I split the
declaration into three constraints, each with only one target, it
worked. However, in the description of the extension point, the target
element is allowed zero, one or more times? Is this a bug or is my
understanding flawed?

Previous Topic:[Teneo] EEnum attributes getting reset after a query
Next Topic:validation using the org.eclipse.emf.validation.constraintProviders extension point
Goto Forum:

Current Time: Thu Feb 25 22:36:35 GMT 2021

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

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

Back to the top