Hi Laurent,
Thanks for the links but I think my problem is not directly related to
these because "my" input is a String, so all the '\n'-separated
substrings are naturally ordered (they should be).
I face the same problem when I use tokenizeLine()...
Regards,
Thierry.
Topcased user list where issues are discussed a écrit :
Hi,
I don't know the splitNewLine() service. But perhaps, splitNewLine()
returns a non ordered list?
Some related links to random order problem with Accelo3 that may be
able to help you:
* http://www.eclipse.org/forums/index.php/t/236582/
* http://www.eclipse.org/forums/index.php/t/167358/
Regards,
Laurent
Le 03/12/2013 11:20, Topcased user list where issues are discussed a
écrit :
Hi Topcased users,
I use the latest version of Accelo under Topcased 5.1, and I wrote an
acceleo script which uses splitNewLine(). This function seems to work
correctly except that the lines provided are not in the initial order.
Example : I want to display the comment associated with a Constraint
of an Operation. I use this code :
[comment] c : Constraint => c.ownedComment._body is of type String
[/comment]
[for (line : String | c.ownedComment._body.splitNewLine())]
[line/]
[/for]
If c.ownedComment._body would be "line1\nline2\nline3", then the code
above would give :
line3
line2
line1
or
line1
line3
line2
I can't figure out the order of the display, but, very often, it is
not the order of the initial string.
Any clue ? (I also use, with success,
xx.getDocumentation().splitNewLine() on )
Regards,
Thierry.
_______________________________________________
Topcased-users mailing list
[email protected]
http://lists.gforge.enseeiht.fr/cgi-bin/mailman/listinfo/topcased-users
------------------------------------------------------------------------
_______________________________________________
Topcased-users mailing list
[email protected]
http://lists.gforge.enseeiht.fr/cgi-bin/mailman/listinfo/topcased-users
_______________________________________________
Topcased-users mailing list
[email protected]
http://lists.gforge.enseeiht.fr/cgi-bin/mailman/listinfo/topcased-users