Bug 44576 - Code formatter option "Insert a new line before an opening brace" has no effect for single else
Summary: Code formatter option "Insert a new line before an opening brace" has no effe...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M4   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-09 12:17 EDT by Frederic Fusier CLA
Modified: 2003-10-09 17:58 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 Frederic Fusier CLA 2003-10-09 12:17:21 EDT
Open Preferences window on Java->Code Formatter an unselect option "Insert a 
new line before an opening brace".
Expecting the sample to be displayed as follow:
...
		else {
			--size;
		}
		return size;
	}
}
but still see no change:
		else
		{
			--size;
		}
		return size;
	}
}

Note that all other opening braces are well formatted (class, method, if, try, 
catch, etc...)
Comment 1 Olivier Thomann CLA 2003-10-09 13:33:08 EDT
Reproduced. Will be fixed shortly.
Comment 2 Olivier Thomann CLA 2003-10-09 13:40:42 EDT
Fix is ready.
Comment 3 Olivier Thomann CLA 2003-10-09 14:42:33 EDT
Fixed and released.
Regression test added.