Bug 171634 - [formatter] doesn't add line feed at end of file
Summary: [formatter] doesn't add line feed at end of file
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2.1   Edit
Hardware: Other Linux-GTK
: P3 normal (vote)
Target Milestone: 3.3 M5   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-25 04:31 EST by Berno Langer CLA
Modified: 2007-02-06 06:56 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Berno Langer CLA 2007-01-25 04:31:53 EST
I have configured the code formatter in the "New Lines" tab and checked the "at end of file" checkbox.

When a Java class ends with a comment, e.g.

public class MyClass {
}
// comment with no "new line" at the end

the code formatter doesn't add a new line.

But the new line is correctly added when the last comment isn't there, or the comment is a /* ... */ comment.
Comment 1 Olivier Thomann CLA 2007-01-26 13:47:58 EST
Released for 3.3M5.
Added regression tests org.eclipse.jdt.core.tests.formatter.FormatterRegressionTests#test643-649
Comment 2 Eric Jodet CLA 2007-02-06 06:33:13 EST
Verified for 3.3 M5 using build I20070205-0009