1

I was wondering if I can easily annotate Acceleo templates and then get these annotations when working with TraceabilityModel.

Acceleo is now using an annotation to determine entry points for generation:

[comment @main]

So I am asking, if I can use this mechanism to annotate my templates for other purposes, for example:

[comment @org.project.SimpleStatement]
[template public generateSimpleStatement(...)]
...
[/template]

Then, I could be able to get the annotation programmatically when working with traceability model (probably using the org.eclipse.acceleo.traceability.ModuleElement interface).

Triad sou.
  • 2,969
  • 3
  • 23
  • 27
MacJariel
  • 55
  • 6

1 Answers1

1

Acceleo's traceability does not support either annotations or comments : we only record traceability information for the actually generated text bits, not for any of the "extra" information (comments of the module, main annotation, metamodels ...).

That being answered, and though not possible through the means of an annotation, maybe your use case would be worth an enhancement request? Can you describe what you were expecting to achieve through this? (preferrably through the Eclipse M2T forum since stack overflow does not seem to be appropriate for such discussions ;)).

(Note : I am an active developper on Acceleo)

Kellindil
  • 4,523
  • 21
  • 20