|
|
Re: [Validation] How to debug a activation of a constraint [message #424921 is a reply to message #424802] |
Mon, 10 November 2008 19:29 |
Eclipse User |
|
|
|
Originally posted by: cdamus.zeligsoft.com
Hi, Eric,
Thanks for the nudge. Sometimes, I seem to miss a post.
Whenever I have this problem, I start by looking in the workspace log to
see whether the configuration of my constraint bindings made any boo-boo.
If I see nothing in the log, then I put a breakpoint in the
ClientContextManager::getBindings(EObject, Collection) method to see
which constraints we have gotten from providers that are applicable my
object on which I am expecting the problem constraint to be evaluated.
If the expected constraint isn't among them, then I start over again
with a breakpoint in the IModelConstraintProvider implementation that I
was expecting to provide the constraint, in its
Otherwise, I proceed with a breakpoint in the
ClientContextManager::getBindingsFor(EObject) method. This tells me
which client contexts seem to match the object an which I am expecting
some constraint to be evaluated.
If the right context matches, then I continue with a breakpoint in
ClientContextManager::getBindings(IClientContext, Collection) to see
which constraints match the client context, and whether the constraint
that I expected to be evaluated was filtered out at this stage.
If none of that turns up an answer, then perhaps somebody has installed
an IConstraintFilter on your IValidator to do client-directed filtering?
HTH,
Christian
Eric Rizzo wrote:
> I've got a AbstractModelConstraint that, for some reason, is not getting
> invoked. In fact, its class is not even being loaded. I've written a
> bunch of these things and configured them via the constraintBindings and
> constraintProviders extension points, but this one is not activating for
> some reason that I can't determine. I'm pretty sure it is something
> incorrect in the binding or category or provider configuration, but I
> just don't know what.
>
> So how does one go about debugging why my particular constraint is not
> being invoked when the appropriate EObject is changed/persisted? I tried
> setting some breakpoints but the code in the validation framework is not
> all that easy to follow if you aren't familiar with it.
>
> Any help is appreciated,
> Eric
|
|
|
Powered by
FUDForum. Page generated in 0.02401 seconds