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: 118
Registered: May 2012
Senior Member
Hello

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)


Thanks
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: 2165
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 | c.name). I hope this helps.

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


Current Time: Sat Apr 27 04:42:54 GMT 2024

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

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

Back to the top