Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » problem with multiStatus
problem with multiStatus [message #31940] Thu, 05 July 2007 00:45
Eclipse UserFriend
Originally posted by: asma.charfi.com

Hi,
I tried to use EMF Validation to validate more than one constraint added to
one element (I ad my ocnstraits on stereotype)

I am using org.eclipse.emf.validation.examples.general In my class which
extends AbstractModelConstrain
I used ConstraintStatus.createMultiStatus(ctx,problems) method us
explained in the validate method detail.
When I run my plugin and click on the element the 2 constraints are checked
and I get 2 error messages as defined in ConstraintStatus.createStatus()
arguments.

I thought that it works and now I can validate more than one constraints,but
the problem is that when I click on the model (not only one element) I did
not get the good messages ( this constraints are violated by this element) I
got this:
"Some model constraints failed; see messages for details"
I did not understand why I get such message? (when I validate only one
constraint by element and click on the model it works perfectly)

thank you

asma
Re: problem with multiStatus [message #31982 is a reply to message #31940] Wed, 04 July 2007 17:40 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Asma,

Please use the EMF newsgroup (which I have included in this reply) for
questions about the EMF Validation framework; this is not an OCL problem.

The "Some model constraints failed" message is provided by the framework as
a generic message indicating that validation produced more than one
message. The message is generic because the framework doesn't know what
kind relationship there may or may not be between the constraints that
failed. It would seem that, when you validate the whole model, there are
other constraint violations being reported in addition to the one that you
are looking for.

Whenever the IValidator returns a multi-status, you will find that its
children are the statuses returned by your constraints. In particular, the
multi-status produced by your constraint is a child of this generic
message. Only in the (possibly rare) case that there is only a single
problem to report (or none at all) will the result of the IValidator not be
this generic multi-status.

HTH,

Christian


charfi asma wrote:

> Hi,
> I tried to use EMF Validation to validate more than one constraint added
> to one element (I ad my ocnstraits on stereotype)
>
> I am using org.eclipse.emf.validation.examples.general In my class which
> extends AbstractModelConstrain
> I used ConstraintStatus.createMultiStatus(ctx,problems) method us
> explained in the validate method detail.
> When I run my plugin and click on the element the 2 constraints are
> checked and I get 2 error messages as defined in
> ConstraintStatus.createStatus() arguments.
>
> I thought that it works and now I can validate more than one
> constraints,but the problem is that when I click on the model (not only
> one element) I did not get the good messages ( this constraints are
> violated by this element) I got this:
> "Some model constraints failed; see messages for details"
> I did not understand why I get such message? (when I validate only one
> constraint by element and click on the model it works perfectly)
>
> thank you
>
> asma
Previous Topic:Syntax helper for OCL undefined type
Next Topic:Parsing problem.
Goto Forum:
  


Current Time: Fri Apr 19 13:15:01 GMT 2024

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

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

Back to the top