Bug 51623 - [formatter] Wrong formatting when "Preserve existing line breaks" switched on
Summary: [formatter] Wrong formatting when "Preserve existing line breaks" switched on
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 M8   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-11 08:56 EST by Nico Seessle CLA
Modified: 2004-03-25 06:17 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 Nico Seessle CLA 2004-02-11 08:56:11 EST
Build 200402101600

Take the following code (this is how it looks when formatted using the "Default"
settings)

public class Test {
	public void foo(String s1, String s2, String s3, String s4, String s5,
			String s6, String s7, String s8) {
	}
}

now define a new formatter setting and switch on New Lines -> Preserve existing
line break. After reformatting the source now is formatted as

public class Test {
	public void foo(String s1, String s2, String s3, String s4, String s5, 
	String s6, String s7, String s8) {
	}
}
Comment 1 Olivier Thomann CLA 2004-02-11 09:31:38 EST
The line breaks is preserved. The current indentation is used.
I don't advice that this option should be used. It preserves line break, but
that could break existing line splitting.
Comment 2 Olivier Thomann CLA 2004-02-23 13:01:41 EST
The option "preserve user line breaks" has been removed from the code formatter.
It will be removed from the UI soon.
Fixed and released in HEAD.
Comment 3 Jerome Lanneluc CLA 2004-03-25 06:17:25 EST
Assuming that the option is now "Blank Lines->Number of empty line to prerve", 
this is verified in I200403250010