Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » emf validation and allInstances
emf validation and allInstances [message #37259] Mon, 12 June 2006 20:47 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
Previous Topic:emf validation and allInstances
Next Topic:newbee ocl standalone
Goto Forum:
  


Current Time: Sat Apr 20 02:40:45 GMT 2024

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

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

Back to the top