|
Re: error in creating expression using EMF enumeration [message #22231 is a reply to message #22007] |
Wed, 09 May 2007 12:30 |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, Kagan,
No, you just need to use the OCL syntax for qualified names, which uses the
UML-style '::' separator instead of the Java-style '.':
ExpressionsUtil.createQuery(environment, "ProductStatus::ACTIVE", true);
OCL thought you were trying to access a static property named "ACTIVE" of
the ProductStatus classifier. :-)
Cheers,
Christian
Kagan Turgut wrote:
>
> I am trying to create an OCL expression where the value can be anything
> (i.e. an EObject, a primitive, an enumeration).
>
> I get a Sematic exception (ERROR in (variableExpCS): (Unrecognized
> variable: (ACTIVE))
>
> when executing the following:
>
> ExpressionsUtil.createQuery(environment, "ProductStatus.ACTIVE", true)
>
> ProductStatus in an Enumeration where ACTIVE is one possible value.
>
> Assuming that this API is the right API, Do I need to prepare the
> "environment" to let it know about the enumerations?
>
> kagan
|
|
|
Powered by
FUDForum. Page generated in 0.03981 seconds