Bug 417991 - [plan] tracebility between generated diagram code and source templates
Summary: [plan] tracebility between generated diagram code and source templates
Status: NEW
Alias: None
Product: GMF-Tooling (ARCHIVED)
Classification: Modeling
Component: Generation / Templates (show other bugs)
Version: 3.2   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: 3.2   Edit
Assignee: Michael Golubev CLA
QA Contact:
URL:
Whiteboard: Extensibility
Keywords: plan
Depends on:
Blocks:
 
Reported: 2013-09-25 05:08 EDT by Michael Golubev CLA
Modified: 2013-12-12 05:20 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Golubev CLA 2013-09-25 05:08:15 EDT
It is common problem, especially for users not very familiar with the GMF T internals, to find the source template that produces particular line of the result diagram code. 

Switching to the Xtend2-based template language already improved the user experience in this area a bit, as it is now possible to run the generation in the debugger (just a standard Xtend2-provided feature).

However, it does not solve the problem, as user still need to go step by step through template execution to find out the interesting place. 

At the same time, the mentioned debugger support for Xtend2 comes from back-traces models (*.java._traces) that Xtend2 cares to link between Xtend2 generators and source Xtend2 templates. 

In context of GMF T, the same or similar approach may be used to back-trace the generated diagram code to the templates that were used to generate it. 

Advanced version of this feature may even allow toolsmith to set special "gen-breakpoint" somewhere in the  generated code, re-run the generation and be stopped  in Xtend2 debugger when the subject code is about to be generated.
Comment 1 Ralph Gerbig CLA 2013-09-25 05:12:55 EDT
A very helpful thing would also to write into the source code where something comes from. For example in the javadoc of a method could be written "generated by templateAB.xpt:ruleXY"