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

Bug 311478

Summary: [xtext][generator] Allow to configure NL in the workflow
Product: [Modeling] TMF Reporter: Ed Willink <ed>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: sebastian.zarnekow, st.oehme, sven.efftinge
Version: 0.7.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: v2.7

Description Ed Willink CLA 2010-05-04 02:32:22 EDT
After regenerating an editor, a Synchronize with CVS shows changes because (on Windows with default settings) CVS files have CR-LF while regenerated files have NL.
Comment 1 Sven Efftinge CLA 2010-05-26 06:10:25 EDT
Xpand puts into the file what ever the template file contains. I.e. if the template files contain NL it generates NL. In the case of Xtext's generator it is NL. 

Do you want us to generate different newline characters depending on what CVS client people use?
Comment 2 Ed Willink CLA 2010-05-26 11:05:59 EDT
(In reply to comment #1)
> Xpand puts into the file what ever the template file contains. I.e. if the
> template files contain NL it generates NL. In the case of Xtext's generator it
> is NL. 
> 
> Do you want us to generate different newline characters depending on what CVS
> client people use?

I doubt that is the correct solution.

With genmodel, if I regenerate, I appear to have a lot of outgoing changes, and when I Synchronize with repository the changes vanish.

With Xtext, if I regenerate, I appear to have a lot of outgoing changes, but when I Synchronize with repository the changes are still there, although the changes are solely to do with line endings. When I commit these changes CVS ignores them, but I have to incur the delays from multiple 4.5MB file transfers.

I would like to see Xtext creating files and lines in the same way as genmodel.
Comment 3 Ed Willink CLA 2010-12-13 06:16:30 EST
Ping.

Window->Preferences->General has a "New text file line delimiter", that I have as default, but could explicitly set to Mac/Unix/Windows. I presume the platform inherits the default (Windows) setting, which is what it would be helpful for Xtext to use.
Comment 4 Sebastian Zarnekow CLA 2014-07-15 12:30:25 EDT
Pushed to review.

See https://git.eclipse.org/r/29920