Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Loop in the query of acceleo(Loop in the query of acceleo)
Loop in the query of acceleo [message #1809078] Mon, 08 July 2019 13:05 Go to next message
Mohammad Inayatullah is currently offline Mohammad InayatullahFriend
Messages: 21
Registered: May 2019
Junior Member
Can any one please give some example of loop inside query of acceleo. i want to implement loop inside following query.

[query public getClassPropertyFromAssociation(p : Property) : OclAny =
if p.upper = -1 then
'public IList<'+p.type.name+'> '+ p.type.name.toUpperFirst() +'s { get; set; }'
else
'public '+ p.type.name+' '+p.type.name.toUpperFirst()+' { get; set; }'
endif/]
Re: Loop in the query of acceleo [message #1809080 is a reply to message #1809078] Mon, 08 July 2019 13:16 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6440
Registered: July 2009
Senior Member
Hi

You don't provide any clue as to what ou want to loop over or with waht.

One common idiom is

Sequence{1..anOrderedCollection->size()}->iterate(i : Integer ... anOrderedCollection->at(i) ... )

Regards

Ed Willink
Previous Topic:Class properties from Element
Next Topic:Refer one mtl file in another
Goto Forum:
  


Current Time: Sat Aug 24 18:15:50 GMT 2019

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

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

Back to the top