Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 345574 - Acceleo traceability does not link text generated using enum.toString()
Summary: Acceleo traceability does not link text generated using enum.toString()
Status: CLOSED FIXED
Alias: None
Product: Acceleo
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-12 06:48 EDT by macjariel CLA
Modified: 2015-05-27 08:56 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description macjariel CLA 2011-05-12 06:48:19 EDT
Build Identifier: 20110218-0911

I am trying to develop a DSL debugger and I decided to use Acceleo and its traceability model to link between DSL and generated GPL.

However, when I try print an enum in my template, Acceleo does not generate traceability information for that text.

Reproducible: Always

Steps to Reproduce:
To reproduce, consider the following testcase.
I have this simple Xtext grammar of my DSL:

Model:
	(statements+=Statement)*;
	
Statement:
	kind=CommandKind ";";

enum CommandKind:
	STEP="step" |
	TURNLEFT="turnLeft" |
	TURNRIGHT="turnRight";

Then I use this Acceleo template to generate the code:

[template public generate(m: Model)]
[comment @main /]
[file ('output', false, 'UTF-8')]
[for (st: Statement | m.statements)]
	[self.kind.toString() /];
[/for]
[/file]
[/template]


I use the following DSL model:

step;
turnLeft;
turnRight;

I try to generate the code and set Acceleo to show the traceability model in the result view. Then I double click at one of the statements in the view and generated code for that statement should get highlighted in the editor. However, only the indentation before the command and the semicolon after the command gets highlighted. Text generated using [self.kind.toString() /] is not linked by the traceability model.
Comment 1 Stephane Begaudeau CLA 2011-09-16 08:39:59 EDT
A fix has been contributed on HEAD with a unit test for this case, the fix will be available in Acceleo 3.2.0
Comment 2 Laurent Goubet CLA 2015-05-27 08:56:01 EDT
Closing resolved bugs