Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » sortedBy
sortedBy [message #1277401] Wed, 26 March 2014 00:02 Go to next message
Arseniy Isakov is currently offline Arseniy IsakovFriend
Messages: 78
Registered: May 2012

I am using in my query sortBy operation but as a result I am getting exception.
Can you please provide some example for sortBy operation

domain::Operation.allInstances()->select(r|r.oclAsType(domain::Operation).uid ='423894789').oclAsType(domain::Operation).parameters->sortBy(r|r.oclAsType(domain::Parameter).order)

Arserniy Isakov
Re: sortedBy [message #1277638 is a reply to message #1277401] Wed, 26 March 2014 09:09 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 1532
Registered: July 2009
Location: York, UK
Senior Member

Hi Arseniy,

Sure. sortBy returns a copy of the collection on which it is invoked, sorted by the result of the provided expression. For example, the following expression would return a name-sorted collection of all EClasses in an Ecore model: EClass.all.sortBy(c | I hope this helps.

Previous Topic:[EVL] Access to parent node
Next Topic:[URGENT] Creating XML Model using EOL
Goto Forum:

Current Time: Sun May 27 12:08:59 GMT 2018

Powered by FUDForum. Page generated in 0.01359 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top