|
|
Re: Generate text on Annotation [message #1844074 is a reply to message #1843942] |
Tue, 31 August 2021 08:58 |
|
Hello Pascal,
As Ed mentionned, the wiki lists a few of the rules to keep in mind when migrating an Acceleo 2 project towards Acceleo 3.
In this case though, the acceleo 2 constructs for filtering are not intuitive and have to be translated to a proper filtering, I suggest using a query for that. Something like the following should give you the result you're expecting:
[template public scTrier(class : EClass)]
[for (attribute : EAttribute | class.eAttributes->select(att : EAttribute | att.hasAnnotation())) separator (',')][name/][/for]
[/template]
[query public hasAnnotation(att : EAttribute) : EBoolean =
att.eAnnotations->select(ann : EAnnotation | ann.source = 'fce' and ann.details->select(entry : EStringToStringMapEntry | entry.key = 'trier')->size() > 0)->size() > 0
/]
[/query]
Regards,
Laurent Goubet
Obeo
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03623 seconds