0
votes

I've recently started working with Acceleo and it's really hard to me.

Nevertheless I've encountered a problem:

All variables are 'final', but I'd like to count how many times occurred specific statement. Let's say: how many times I have 'if'.

I've found some idea to add new items to collection, but I don't really know how to do it.

Please: understand I'm total newbie in acceleo, so please: any easy solution?

1

1 Answers

0
votes

You'd have to use java services to keep track of state such as counters.

Could you share the reason why you need to count statements? Because as Acceleo is a text generator it sounds odd to have this requirement, and maybe it's because you're doing something wrong.

So I wouldn't recommend to use java services without knowing more about why you want to count statements.