Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 366058

Summary: Problem using separator in for loop
Product: [Modeling] Acceleo Reporter: William Piers <william.piers>
Component: CoreAssignee: Project Inbox <acceleo-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: stephane.begaudeau
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
An Acceleo project reproducing the bug none

Description William Piers CLA 2011-12-08 11:11:18 EST
Created attachment 208101 [details]
An Acceleo project reproducing the bug

When using separator('\n') in a for loop, the separator applies to each line generated inside of the loop.
The issues happens when:
- the .mtl file use \r\n line separators
- the loop is embedded in a template or a let

I attached a project which reproduces the bug.

Workaround: replacing separator('\n') by separator('\r\n')
Comment 1 Stephane Begaudeau CLA 2012-02-20 07:40:12 EST
The problem comes from the use of a line separator of a different platform (ie \r\n on unix or \n on windows), Acceleo 3.3.0 will feature a way to get the line separator of the currently used platform, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=357202

*** This bug has been marked as a duplicate of bug 357202 ***
Comment 2 Laurent Goubet CLA 2015-05-27 08:56:53 EDT
Closing resolved bugs