|
|
Re: [ATL] OrderedSet.indexOf operation not found [message #482552 is a reply to message #482441] |
Thu, 27 August 2009 02:42 |
Jevon Messages: 164 Registered: July 2009 |
Senior Member |
|
|
Hi,
Thanks for the information, the bug has been submitted:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=287768
Cheers!
Jevon
William Piers wrote:
> Hello,
>
> This operation seems to be unimplemented, so it is a bug. Could you
> report it ?
>
> Thanks in advance,
>
> William
>
> Jevon Wright a écrit :
>> Hi,
>>
>> I am working on an ATL template that has the following helper definition:
>>
>> helper context OclAny def: getElementId() :
>> String = 'http://openiaml.org/simple#test' +
>> if simple!EObject.allInstancesFrom('IN')->includes(self)
>> then simple!EObject.allInstancesFrom('IN')->indexOf(self)->toString()
>> else 'unknown'
>> endif;
>>
>> The idea behind this template is that I can get a unique ID of an
>> element based on its absolute position. However, if I use this against
>> an EMF model, I get the following exception message:
>>
>> Operation not found: OrderedSet
>> {...}.indexOf(org.openiaml.model.owl.simple.simple.impl.Inte rnetApplicationImpl)
>>
>>
>> If I instead convert this OrderedSet into a Sequence as follows, the
>> ATL template works without any errors:
>>
>>
>> simple!EObject.allInstancesFrom('IN')->asSequence()->indexOf(self)- >toString()
>>
>>
>> This wasn't expected, considering the ATL User Guide [1] says
>> OrderedSet.indexOf(o : oclAny) is supported.
>>
>> Is this expected behaviour? Is any EObject an oclAny? Or is this a
>> problem with the documentation?
>>
>> Thanks!
>>
>> Jevon
>>
>> [1]:
>> http://wiki.eclipse.org/ATL/User_Guide#OrderedSet_data_type_ operations
|
|
|
Powered by
FUDForum. Page generated in 0.04892 seconds