emf validation and allInstances [message #37259] |
Mon, 12 June 2006 20:47 |
Eclipse User |
|
|
|
Originally posted by: saya.txesystems.com
Hi,
Is there a way to use ocl allInstances() in the invariants that are
provided in through constraint provider extensions? I have tried
specifying an invariant like Address.allInstances()->asSet()->size()=3 in
the xml file (Address is an EClass) but, when I run batch validation on an
instance of Address, the satus says that this constraint was disabled
becuase of a NullPointerException. When I evaluate a ocl query on an
eObject, I can use query.setExtentMap(). Is there a way to do this with
the validation framework?
I would appreciate any pointer. We have some constraints on our metadata
that require us to know all instances of an EClass and we need a construct
like allInstances().
Thanks,
Selcuk
|
|
|
Re: emf validation and allInstances [message #37327 is a reply to message #37259] |
Tue, 13 June 2006 13:31 |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, Selcuk,
You are correct: the current implementation of Query will NPE on an attempt
to use allInstances() without setting the extent map, and the validation
framework does not provide a work-around.
This problem will be resolved incidentally by
https://bugs.eclipse.org/bugs/show_bug.cgi?id=146378.
Cheers,
Christian
Selcuk Aya wrote:
> Hi,
> Is there a way to use ocl allInstances() in the invariants that are
> provided in through constraint provider extensions? I have tried
> specifying an invariant like Address.allInstances()->asSet()->size()=3 in
> the xml file (Address is an EClass) but, when I run batch validation on an
> instance of Address, the satus says that this constraint was disabled
> becuase of a NullPointerException. When I evaluate a ocl query on an
> eObject, I can use query.setExtentMap(). Is there a way to do this with
> the validation framework?
>
> I would appreciate any pointer. We have some constraints on our metadata
> that require us to know all instances of an EClass and we need a construct
> like allInstances().
>
> Thanks,
> Selcuk
|
|
|
Re: emf validation and allInstances [message #580699 is a reply to message #37259] |
Tue, 13 June 2006 13:31 |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, Selcuk,
You are correct: the current implementation of Query will NPE on an attempt
to use allInstances() without setting the extent map, and the validation
framework does not provide a work-around.
This problem will be resolved incidentally by
https://bugs.eclipse.org/bugs/show_bug.cgi?id=146378
Cheers,
Christian
Selcuk Aya wrote:
> Hi,
> Is there a way to use ocl allInstances() in the invariants that are
> provided in through constraint provider extensions? I have tried
> specifying an invariant like Address.allInstances()->asSet()->size()=3 in
> the xml file (Address is an EClass) but, when I run batch validation on an
> instance of Address, the satus says that this constraint was disabled
> becuase of a NullPointerException. When I evaluate a ocl query on an
> eObject, I can use query.setExtentMap(). Is there a way to do this with
> the validation framework?
>
> I would appreciate any pointer. We have some constraints on our metadata
> that require us to know all instances of an EClass and we need a construct
> like allInstances().
>
> Thanks,
> Selcuk
|
|
|
Powered by
FUDForum. Page generated in 0.02922 seconds