Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312901 - Code generation: code formatting overrides line delimiter settings
Summary: Code generation: code formatting overrides line delimiter settings
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: Tools (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Dave Steinberg CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-14 09:07 EDT by Henning Heitkoetter CLA
Modified: 2010-05-19 06:43 EDT (History)
1 user (show)

See Also:
Ed.Merks: iplog+


Attachments
Use line delimiter (1.72 KB, patch)
2010-05-14 09:10 EDT, Henning Heitkoetter CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Henning Heitkoetter CLA 2010-05-14 09:07:30 EDT
The java code generation tries to respect the existing line delimiter settings of a file (bug 164803). However, when using code formatting afterwards, no line delimiter is passed to the formatter. The formatter (DefaultCodeFormatter) thus uses the line delimiter specified by the system property line.separator.
That way, the code is reformatted with a possibly different delimiter.

I'll attach a patch.
Comment 1 Henning Heitkoetter CLA 2010-05-14 09:10:06 EDT
Created attachment 168533 [details]
Use line delimiter

The line delimiter used for code generation is passed to the code formatter.
Comment 2 Ed Merks CLA 2010-05-14 10:16:06 EDT
The contribution is committed to CVS for 2.6.  Thanks so much for the fix!! :-)
Comment 3 Ed Merks CLA 2010-05-19 06:43:13 EDT
The changes are in 2.6RC1.