Question on sortedBy [message #1711063] |
Mon, 12 October 2015 15:44 |
Marc FLAUW Messages: 151 Registered: July 2009 |
Senior Member |
|
|
Hi,
I would have a question on how to force a specific sorting order.
I have a set of for loops on packages:
[for (p:Package | self.ownedElement->filter(Package)->sortedBy(name))]<drop/>
A.1 [p.name/]
[p.displayInfo()/]<drop/>
[for (p2 :Package| p.ownedElement->filter(Package)->sortedBy(name))]<drop/>
A.1.1 [p2.name/]
[p2.displayInfo()/]<drop/>
[/for]
[/for]
This code sorts my pacjkage in alphabetical order, but for the end packages, the sub-packages are named Classes, Datatypes, Diagrams, but I would have to have them in the order Diagrams first, then Classes, then Datatypes.
I have tried prefixing the name with a number, but having a title like
A.1.1.1 1-Diagrams
is not very nice.
Any other way to do custim sorting?
Best regards,
Marc
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04505 seconds