Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » union 2 collection (need help to merge 2 collectons together)
union 2 collection [message #1725209] Tue, 01 March 2016 17:18 Go to next message
taghreed altamimi is currently offline taghreed altamimiFriend
Messages: 145
Registered: October 2014
Senior Member
Hello,

I have 2 collections :
var activities1= t.children.select(a|a.tagName="task-activities");
var activities= E.children.select(a|a.tagName="activity");
var results =activities1+ activities
I need to union the results of the two select statements to be able to treat them as one collection then I will be able to use the loop as bellows:

for (v in results ){

can you please tell me how to do that.

Cheers,
Taghreed.
Re: union 2 collection [message #1725223 is a reply to message #1725209] Tue, 01 March 2016 20:54 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 1484
Registered: July 2009
Location: York, UK
Senior Member

Hi Taghreed,

Off the top of my head the following should work.

var results = activities1.includingAll(activities);


Cheers,
Dimitris
Re: union 2 collection [message #1725331 is a reply to message #1725223] Wed, 02 March 2016 15:29 Go to previous message
taghreed altamimi is currently offline taghreed altamimiFriend
Messages: 145
Registered: October 2014
Senior Member
Perfect thank you its done .

Taghreed.
Previous Topic:Load second UML model with ANT
Next Topic:how to see the execution time of the transformation
Goto Forum:
  


Current Time: Mon Nov 20 21:24:02 GMT 2017

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

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