Accessing a set that's actually a sequence [message #540533] |
Wed, 16 June 2010 13:13 |
Eclipse User |
|
|
|
Originally posted by: kris.robertson.atosorigin.com
I'm working with a metamodel (not mine) which describes a multiplicity
many reference as being unordered. Acceleo therefore returns the
reference as a set.
Having seen the implementation, however, I know that the reference is
actually stored in an ordered list.
Is there any way for me to access the collection in it's ordered state?
|
|
|
Re: Accessing a set that's actually a sequence [message #540570 is a reply to message #540533] |
Wed, 16 June 2010 14:10 |
Eclipse User |
|
|
|
Originally posted by: kris.robertson.atosorigin.com
On 16/06/2010 15:13, Kris Robertson wrote:
>
> I'm working with a metamodel (not mine) which describes a multiplicity
> many reference as being unordered. Acceleo therefore returns the
> reference as a set.
>
> Having seen the implementation, however, I know that the reference is
> actually stored in an ordered list.
>
> Is there any way for me to access the collection in it's ordered state?
>
>
Okay eContents(T) does the job.
|
|
|
Re: Accessing a set that's actually a sequence [message #540810 is a reply to message #540570] |
Thu, 17 June 2010 12:30 |
|
This is a multi-part message in MIME format.
--------------090103000706030207020205
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Hi Kris,
Happy to see that you found a workaround, as your first issue is pure
OCL : an "unordered" reference will be returned in a Set, and you would
have had to reorder afterwards through "->sortBy()" or "->asOrderedSet()".
Laurent Goubet
Obeo
Kris Robertson wrote:
> On 16/06/2010 15:13, Kris Robertson wrote:
>>
>> I'm working with a metamodel (not mine) which describes a multiplicity
>> many reference as being unordered. Acceleo therefore returns the
>> reference as a set.
>>
>> Having seen the implementation, however, I know that the reference is
>> actually stored in an ordered list.
>>
>> Is there any way for me to access the collection in it's ordered state?
>>
>>
>
> Okay eContents(T) does the job.
--------------090103000706030207020205
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="laurent_goubet.vcf"
begin:vcard
fn:Laurent Goubet
n:Goubet;Laurent
org:<a href="http://www.obeo.fr">Obeo</a>
email;internet:laurent.goubet@obeo.fr
url:http://www.obeo.fr
version:2.1
end:vcard
--------------090103000706030207020205--
|
|
|
Powered by
FUDForum. Page generated in 0.03473 seconds