Skip to main content



      Home
Home » Modeling » M2T (model-to-text transformation) » Traceability(Acceleo)
Traceability [message #1778396] Wed, 13 December 2017 14:16 Go to next message
Eclipse UserFriend
Hi,

i would like to implement the possibility of tracing in acceleo (model to text transformation). For example for displaying the trace from the attributes of the model classes to the java code and other things. I read that there exists some traceability plug ins but i really don´t know where to start. So my question is how to start correctly and what i need to integrate.
Thank you for your help.
Re: Traceability [message #1779237 is a reply to message #1778396] Thu, 04 January 2018 04:29 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

You can look at the contents of the org.eclipse.acceleo.traceability plugin for the traceability-enabled implementation of the Acceleo generation engine. Traceability will be enabled if you set org.eclipse.acceleo.common.preference.AcceleoPreferences.switchTraceability(boolean) to true before starting your generation. This is only available through programmatic launches as we've removed the preference page to activate it. Take note that the traceability plugin is no longer supported and that traceability information it returns might not be 100% accurate. You can retrieve the traceability model after your generation if you've added a generation listener to the engine (org.eclipse.acceleo.engine.generation.AcceleoEngine.addListener(IAcceleoTextGenerationListener)) that notifies the engine it is interested in "generation end" events (org.eclipse.acceleo.engine.event.IAcceleoTextGenerationListener.listensToGenerationEnd() returns true). In such a case, the AcceleoTextGenerationEvent sent to the listener's "generationEnd" method will contain the evaluation traces in the form of a org.eclipse.acceleo.traceability.TraceabilityModel object.

Laurent Goubet
Obeo
Re: Traceability [message #1780963 is a reply to message #1779237] Tue, 30 January 2018 08:51 Go to previous message
Eclipse UserFriend
Thank you.

But how i can retrieve this informations from generationEnd it shows me always that it´s null. How i can print them out?

To get the target isn´t a problem.. but how is it possible to get the source data in this generationEnd method?
My target is to have this output: From Source object is generated this target

[Updated on: Wed, 31 January 2018 16:59] by Moderator

Previous Topic:Access to keys in EMap member of model element
Next Topic:[Acceleo] How to access elements in for loop OR use a java service for that?
Goto Forum:
  


Current Time: Sun May 11 12:43:32 EDT 2025

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

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

Back to the top