Bug 47811 - New Code Formatter: doesn't handle several classes per CU
Summary: New Code Formatter: doesn't handle several classes per CU
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 M6   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-01 10:34 EST by Silvio Böhler CLA
Modified: 2003-12-17 06:21 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 Silvio Böhler CLA 2003-12-01 10:34:04 EST
For Example:

two classes in one source file
class One {}
class Two {}

results in 

class One {} class Two {}

or 

class One {
} class Two {
}

Admittedly, this is seldom, but useful for my preview window in the preference
page - and it is valid Java. I suggest to just preserve the new lines between
the classes, which is not done currently, even with PRESERVE_USER_LINEBREAKS
enabled.
Comment 1 Olivier Thomann CLA 2003-12-01 10:35:57 EST
I will investigate.
Comment 2 Olivier Thomann CLA 2003-12-01 11:52:24 EST
Fixed and released in HEAD.
The formatter should now respect the settings to preserve user line breaks or
the number of empty lines to preserve.
Regression test added.
Comment 3 David Audel CLA 2003-12-17 06:21:15 EST
Verified for 3.0M6