Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Traceability(Acceleo)
Traceability [message #1778396] Wed, 13 December 2017 19:16 Go to next message
Eduard C. is currently offline Eduard C.Friend
Messages: 2
Registered: December 2017
Junior Member

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 09:29 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member

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
Re: Traceability [message #1780963 is a reply to message #1779237] Tue, 30 January 2018 13:51 Go to previous message
Eduard C. is currently offline Eduard C.Friend
Messages: 2
Registered: December 2017
Junior Member
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 21:59]

Report message to a 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: Mon Jul 22 05:03:24 GMT 2024

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

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

Back to the top