Home » Modeling » OCL » GMF/OCL Bug?
GMF/OCL Bug? [message #55340] |
Fri, 09 May 2008 15:49 |
Eclipse User |
|
|
|
Originally posted by: vineet.architexa.com
Hi,
I am trying to setup an OCL constraint in the GMF Map and am getting an
error when trying to validate or generate code using it. This constraint
does work in the OCL interpreter:
> self.connectorType = metadata::ConnectorType::Input
The Background:
in package metadata
enum ConnectorType {Input, Output}
in package graph
class Connector
property connectorType: ConnectorType
class Processor
property connectors: Connector
The constraint is on a connector, and my feeling is that the error has
to deal with accessing the other package, but the expression does return
a true when clicking on a connector and running it in the ocl interpreter.
Any help will be appreciated.
Thanks!
Regards,
Vineet
|
|
|
Re: GMF/OCL Bug? [message #55367 is a reply to message #55340] |
Fri, 09 May 2008 16:26 |
Eclipse User |
|
|
|
Originally posted by: give.a.damus.gmail.com
Hi, Vineet,
What is the error message that you see? That should help to diagnose
the problem.
Cheers,
Christian
Vineet Sinha wrote:
> Hi,
> I am trying to setup an OCL constraint in the GMF Map and am getting an
> error when trying to validate or generate code using it. This constraint
> does work in the OCL interpreter:
>> self.connectorType = metadata::ConnectorType::Input
>
> The Background:
> in package metadata
> enum ConnectorType {Input, Output}
> in package graph
> class Connector
> property connectorType: ConnectorType
> class Processor
> property connectors: Connector
>
> The constraint is on a connector, and my feeling is that the error has
> to deal with accessing the other package, but the expression does return
> a true when clicking on a connector and running it in the ocl interpreter.
>
> Any help will be appreciated.
>
> Thanks!
>
> Regards,
> Vineet
|
|
|
Re: GMF/OCL Bug? [message #55394 is a reply to message #55367] |
Fri, 09 May 2008 17:15 |
Eclipse User |
|
|
|
Originally posted by: vineet.architexa.com
Sorry I meant to include this earlier. The error message is:
> Invalid expression body 'self.connectorType = metadata::ConnectorType::Input'. Cause: Invalid expression body 'self.connectorType = metadata::ConnectorType::Input'. Cause: ERROR in (enumerationOrClassLiteralExpCS): (Unknown type ([metadata, ConnectorType, Input]))
Thanks for looking into this!
Vineet
Christian W. Damus wrote:
> Hi, Vineet,
>
> What is the error message that you see? That should help to diagnose
> the problem.
>
> Cheers,
>
> Christian
>
> Vineet Sinha wrote:
>> Hi,
>> I am trying to setup an OCL constraint in the GMF Map and am getting
>> an error when trying to validate or generate code using it. This
>> constraint does work in the OCL interpreter:
>>> self.connectorType = metadata::ConnectorType::Input
>>
>> The Background:
>> in package metadata
>> enum ConnectorType {Input, Output}
>> in package graph
>> class Connector
>> property connectorType: ConnectorType
>> class Processor
>> property connectors: Connector
>>
>> The constraint is on a connector, and my feeling is that the error has
>> to deal with accessing the other package, but the expression does
>> return a true when clicking on a connector and running it in the ocl
>> interpreter.
>>
>> Any help will be appreciated.
>>
>> Thanks!
>>
>> Regards,
>> Vineet
|
|
|
Re: GMF/OCL Bug? [message #55473 is a reply to message #55394] |
Fri, 09 May 2008 21:32 |
Eclipse User |
|
|
|
Originally posted by: give.a.damus.gmail.com
Hi, Vineet,
Right, this is what you had indicated: the qualified reference to your
enumeration literal cannot be resolved.
Either your metadata EPackage is not registered in the package registry
used by the OCL Environment employed by GMF for audit constraints, or it
is registered in the static package registry but resides there still as
a PackageDescriptor. Until the package is looked up in the registry by
its namespace URI (and thus the descriptor replaced by your package
instance), OCL will not be able to find the EPackage named 'metadata'
You might try debugging the
EcoreEnvironment::findPackage(List<String>, EPackage.Registry)
method to see why this qualified name isn't being resolved as you expect.
HTH,
Christian
Vineet Sinha wrote:
> Sorry I meant to include this earlier. The error message is:
>> Invalid expression body 'self.connectorType =
>> metadata::ConnectorType::Input'. Cause: Invalid expression body
>> 'self.connectorType = metadata::ConnectorType::Input'. Cause: ERROR in
>> (enumerationOrClassLiteralExpCS): (Unknown type ([metadata,
>> ConnectorType, Input]))
>
> Thanks for looking into this!
>
> Vineet
>
> Christian W. Damus wrote:
>> Hi, Vineet,
>>
>> What is the error message that you see? That should help to diagnose
>> the problem.
>>
>> Cheers,
>>
>> Christian
>>
>> Vineet Sinha wrote:
>>> Hi,
>>> I am trying to setup an OCL constraint in the GMF Map and am getting
>>> an error when trying to validate or generate code using it. This
>>> constraint does work in the OCL interpreter:
>>>> self.connectorType = metadata::ConnectorType::Input
>>>
>>> The Background:
>>> in package metadata
>>> enum ConnectorType {Input, Output}
>>> in package graph
>>> class Connector
>>> property connectorType: ConnectorType
>>> class Processor
>>> property connectors: Connector
>>>
>>> The constraint is on a connector, and my feeling is that the error
>>> has to deal with accessing the other package, but the expression does
>>> return a true when clicking on a connector and running it in the ocl
>>> interpreter.
>>>
>>> Any help will be appreciated.
>>>
>>> Thanks!
>>>
>>> Regards,
>>> Vineet
|
|
|
Re: GMF/OCL Bug? [message #55554 is a reply to message #55473] |
Mon, 12 May 2008 22:57 |
Eclipse User |
|
|
|
Originally posted by: vineet.architexa.com
Christian W. Damus wrote:
> ...
> Right, this is what you had indicated: the qualified reference to your
> enumeration literal cannot be resolved.
>
> Either your metadata EPackage is not registered in the package registry
> used by the OCL Environment employed by GMF for audit constraints, or it
> is registered in the static package registry but resides there still as
> a PackageDescriptor. Until the package is looked up in the registry by
> its namespace URI (and thus the descriptor replaced by your package
> instance), OCL will not be able to find the EPackage named 'metadata'
How would I get GMF to do the appropriate registering? As a side note, I
was able to get the constraints working using the Java option in GMF.
Perhaps GMF's integration of OCL has a bug in it?
> ...
> You might try debugging the
>
> EcoreEnvironment::findPackage(List<String>, EPackage.Registry)
>
> method to see why this qualified name isn't being resolved as you expect.
How?
Are you suggesting somehow setting up the OCL interpreter in the
development workspace (as opposed to the runtime workspace)?
Thanks!
Vineet
> Vineet Sinha wrote:
>> Sorry I meant to include this earlier. The error message is:
>>> Invalid expression body 'self.connectorType =
>>> metadata::ConnectorType::Input'. Cause: Invalid expression body
>>> 'self.connectorType = metadata::ConnectorType::Input'. Cause: ERROR
>>> in (enumerationOrClassLiteralExpCS): (Unknown type ([metadata,
>>> ConnectorType, Input]))
>>
>> Thanks for looking into this!
>>
>> Vineet
>>
>> Christian W. Damus wrote:
>>> Hi, Vineet,
>>>
>>> What is the error message that you see? That should help to diagnose
>>> the problem.
>>>
>>> Cheers,
>>>
>>> Christian
>>>
>>> Vineet Sinha wrote:
>>>> Hi,
>>>> I am trying to setup an OCL constraint in the GMF Map and am getting
>>>> an error when trying to validate or generate code using it. This
>>>> constraint does work in the OCL interpreter:
>>>>> self.connectorType = metadata::ConnectorType::Input
>>>>
>>>> The Background:
>>>> in package metadata
>>>> enum ConnectorType {Input, Output}
>>>> in package graph
>>>> class Connector
>>>> property connectorType: ConnectorType
>>>> class Processor
>>>> property connectors: Connector
>>>>
>>>> The constraint is on a connector, and my feeling is that the error
>>>> has to deal with accessing the other package, but the expression
>>>> does return a true when clicking on a connector and running it in
>>>> the ocl interpreter.
>>>>
>>>> Any help will be appreciated.
>>>>
>>>> Thanks!
>>>>
>>>> Regards,
>>>> Vineet
|
|
|
Re: GMF/OCL Bug? [message #55582 is a reply to message #55554] |
Tue, 13 May 2008 16:16 |
Eclipse User |
|
|
|
Originally posted by: cdamus.zeligsoft.com
Vineet Sinha wrote:
> Christian W. Damus wrote:
>> ...
>> Right, this is what you had indicated: the qualified reference to
>> your enumeration literal cannot be resolved.
>>
>> Either your metadata EPackage is not registered in the package
>> registry used by the OCL Environment employed by GMF for audit
>> constraints, or it is registered in the static package registry but
>> resides there still as a PackageDescriptor. Until the package is
>> looked up in the registry by its namespace URI (and thus the
>> descriptor replaced by your package instance), OCL will not be able to
>> find the EPackage named 'metadata'
>
> How would I get GMF to do the appropriate registering? As a side note, I
> was able to get the constraints working using the Java option in GMF.
> Perhaps GMF's integration of OCL has a bug in it?
It isn't up to GMF to register EPackages; your EMF model plug-in does
that. Note that Java code doesn't have to worry about whether the
EPackage descriptor is resolved in the registry, because it doesn't rely
on the registry to look up meta-data.
>> ...
>> You might try debugging the
>>
>> EcoreEnvironment::findPackage(List<String>, EPackage.Registry)
>>
>> method to see why this qualified name isn't being resolved as you expect.
>
> How?
Using a breakpoint in JDT's debugger. Step through the findPackage
algorithm to see what the package registry contains.
> Are you suggesting somehow setting up the OCL interpreter in the
> development workspace (as opposed to the runtime workspace)?
No. The OCL interpreter has nothing to do with it.
>
> Thanks!
>
> Vineet
>
>
>> Vineet Sinha wrote:
>>> Sorry I meant to include this earlier. The error message is:
>>>> Invalid expression body 'self.connectorType =
>>>> metadata::ConnectorType::Input'. Cause: Invalid expression body
>>>> 'self.connectorType = metadata::ConnectorType::Input'. Cause: ERROR
>>>> in (enumerationOrClassLiteralExpCS): (Unknown type ([metadata,
>>>> ConnectorType, Input]))
>>>
>>> Thanks for looking into this!
>>>
>>> Vineet
>>>
>>> Christian W. Damus wrote:
>>>> Hi, Vineet,
>>>>
>>>> What is the error message that you see? That should help to
>>>> diagnose the problem.
>>>>
>>>> Cheers,
>>>>
>>>> Christian
>>>>
>>>> Vineet Sinha wrote:
>>>>> Hi,
>>>>> I am trying to setup an OCL constraint in the GMF Map and am
>>>>> getting an error when trying to validate or generate code using it.
>>>>> This constraint does work in the OCL interpreter:
>>>>>> self.connectorType = metadata::ConnectorType::Input
>>>>>
>>>>> The Background:
>>>>> in package metadata
>>>>> enum ConnectorType {Input, Output}
>>>>> in package graph
>>>>> class Connector
>>>>> property connectorType: ConnectorType
>>>>> class Processor
>>>>> property connectors: Connector
>>>>>
>>>>> The constraint is on a connector, and my feeling is that the error
>>>>> has to deal with accessing the other package, but the expression
>>>>> does return a true when clicking on a connector and running it in
>>>>> the ocl interpreter.
>>>>>
>>>>> Any help will be appreciated.
>>>>>
>>>>> Thanks!
>>>>>
>>>>> Regards,
>>>>> Vineet
|
|
| |
Goto Forum:
Current Time: Sat Dec 21 16:21:24 GMT 2024
Powered by FUDForum. Page generated in 0.03639 seconds
|