Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [henshin-dev] changing the order of referencing elements

Hi Subramanya,

It should work with edge indices. You can find an example here: http://www.ckrause.org/2013/05/henshin-098-working-with-lists.html

What you can do is to access the last element of the list using -1 as index. So if your reference is called "ref" you would write "ref[-1]" in the graphical editor (no quotes). You can also directly set the edge index in the properties view.

Hope this works.

Cheers,
Christian

On May 22, 2014 6:17 PM, "Subramanya K G" <subramanya.kg@xxxxxxxxx> wrote:

Hello All,

I have a question regarding changing the order of the elements being created with the henshin rules.

I have two rules (in the attachment rules.png ) which create referencing element called "Method Service Descriptor" and adds these referencing elements as child to element "Sequence".


After the rules are executed, there would be few Method Service Descriptor elements (depending on the matches found) under the "Sequence".

Now, I want to change the order of these "Method Service Descriptor" elements, i.e. the first "Method Service Descriptor" element to be the last child of Sequence.

Is there any way to do this with henshin rules ?

Thanks for the help!
 


--


Thanks & Regards,
Subramanya



_______________________________________________
henshin-dev mailing list
henshin-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/henshin-dev


Back to the top