Bug 19999 - Code Formatter always clears blank lines to 1
Summary: Code Formatter always clears blank lines to 1
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 major (vote)
Target Milestone: 3.0 M4   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-06-12 06:59 EDT by Dani Megert CLA
Modified: 2003-10-13 10:26 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2002-06-12 06:59:55 EDT
Build 20020611 + plug-in export for build 20020612
1. Uncheck everything on the "New Lines" tab of the code formatter settings
2. Add the following code to a Java editor:
--- begin (don't copy) ---
	public void testDivideByZero() {



		int zero = 0;



		int result = 8 / zero;



		int result = 8 / zero;


	}
	

	
	public void testEquals() {
--- end (don't copy) ---
3. Select that code
4. Select "Format" from the context menu
==> blank lines are compressed to 1 blank line

This is not what I would expect.
Comment 1 Dani Megert CLA 2002-06-12 07:21:12 EDT
Moving to J Core.
Comment 2 Philipe Mulet CLA 2002-06-12 07:23:37 EDT
Working as expected. Might revise this post 2.0.
Comment 3 Philipe Mulet CLA 2002-07-25 06:30:47 EDT
Resurrecting formatter issues in 2.1 stream.
Comment 4 Philipe Mulet CLA 2002-07-25 06:32:37 EDT
Clearing resolution
Comment 5 Olivier Thomann CLA 2003-01-15 13:22:39 EST
We need to clear 2.1 bug reports that won't be addressed before 2.1. The new 
implementation is still in the works. Therefore we cannot include it for 2.1. 
Not enough testing and we need to polish the preferences. This will be address 
for 2.2 as stated in the JDT/Core plan.
Comment 6 Philipe Mulet CLA 2003-06-12 06:36:24 EDT
Resurrecting for 3.0
Comment 7 Olivier Thomann CLA 2003-06-12 15:59:09 EDT
Reopen for 3.0 consideration.
Comment 8 Olivier Thomann CLA 2003-10-03 09:58:57 EDT
This is addressed in the new formatter.
Fixed and released in HEAD.
Regression test added.
Comment 9 David Audel CLA 2003-10-13 10:26:06 EDT
Verified.