Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Count attributes in a model
Count attributes in a model [message #1720473] Mon, 18 January 2016 19:57 Go to next message
Guoming DU is currently offline Guoming DUFriend
Messages: 1
Registered: January 2016
Junior Member
Him

I'm very new with the Acceleo M2T, here is my problem: I have a model which has an element Cpu, I created 2 children of type Cpu and I want the number of Cpus by using the M2T. I've found out that a variable in Acceleo couldn't be changed once it was difined. So is there any way to figure this out?

Thank you guys!
Re: Count attributes in a model [message #1742919 is a reply to message #1720473] Thu, 08 September 2016 15:12 Go to previous message
pere joseph rodríguez is currently offline pere joseph rodríguezFriend
Messages: 12
Registered: October 2014
Junior Member
every time you need it model.allOwnedElements()->selectByType(Cpu)
Previous Topic:tag []
Next Topic:[Acceleo] Problems generating from a referenced metamodel
Goto Forum:
  


Current Time: Fri Dec 15 00:40:01 GMT 2017

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

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