OCl variable of type EEList [message #923925] |
Wed, 26 September 2012 10:02 |
Eclipse User |
|
|
|
Hello,
I added a variable named "objectlist" to the OCL Environment, which is
an EcoreEnvironment, of type EEList.
When I try to evaluate for example the expression "objectlist.at(1)" a
NullpointerException is thrown
(caused by line 225:
result =containerClass.getMethod(operName,javaParms);
in EcoreEvaluationEnvironment).
So am I doing something wrong or is EEList not supported?
Best regards,
Lilija
|
|
|
|
Re: OCl variable of type EEList [message #924146 is a reply to message #923956] |
Wed, 26 September 2012 14:55 |
Eclipse User |
|
|
|
Hey,
I fixed the problem by setting the type of the variable to the OCLType:
var.setType(ocl.getEnvironment().getUMLReflection().asOCLType(EcorePackage.Literals.EE_LIST));
regards
Lilija
Am 26.09.2012 12:43, schrieb Ed Willink:
> Hi
>
> a) the NPE looks rather like the inadequate EDataType support fixed in
> Juno SR1 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=388595).
>
> b) EEList is an opaque EDataType so it has no operations.
>
> c) EEList<T> is a templated type and OMG OCL does not support templated
> types. (The new pivot-based Eclipse OCL has some support.)
>
> d) if EEList was supported as a collection it would be objectList->at(1).
>
> So I'm afraid that EEList is not supported.
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=390427 raised.
>
> Regards
>
> Ed Willink
>
> On 26/09/2012 11:02, Lilija Klassen wrote:
>> Hello,
>>
>> I added a variable named "objectlist" to the OCL Environment, which is
>> an EcoreEnvironment, of type EEList.
>> When I try to evaluate for example the expression "objectlist.at(1)" a
>> NullpointerException is thrown
>> (caused by line 225:
>> result =containerClass.getMethod(operName,javaParms);
>> in EcoreEvaluationEnvironment).
>>
>> So am I doing something wrong or is EEList not supported?
>>
>> Best regards,
>>
>> Lilija
>
|
|
|
Powered by
FUDForum. Page generated in 0.01949 seconds