Bug 160823

Summary: [formatter] Java Conventions [built-in] inserts blank line between field declarations
Product: [Eclipse Project] JDT Reporter: Uwe Kubosch <uwe>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.2.1   
Target Milestone: 3.3 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed fix
none
Updated regression tests none

Description Uwe Kubosch CLA 2006-10-13 03:47:03 EDT
The Sun Java Code conventions state in section 6.1 that multiple field declarations should be on separate lines without forcing blank lines between them.  The example given is:

int level; // indentation level
int size; // size of table

There is no blank line between the two declaration.

Please change the setting for Java Conventions [built-in] to

org.eclipse.jdt.core.formatter.blank_lines_before_field=0

and keep or increase

org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1

to allow for separating groups of fields.

Thank you for your good work, and I hope you can perform this change in an upcoming milestone.
Comment 1 Olivier Thomann CLA 2006-10-23 23:15:51 EDT
Created attachment 52573 [details]
Proposed fix
Comment 2 Olivier Thomann CLA 2006-10-23 23:16:26 EDT
Created attachment 52574 [details]
Updated regression tests
Comment 3 Olivier Thomann CLA 2006-10-24 13:07:30 EDT
Released for 3.3M3.
Comment 4 Uwe Kubosch CLA 2006-10-28 04:05:48 EDT
Thank you.
Comment 5 David Audel CLA 2006-10-30 06:11:29 EST
Verified for 3.3 M3 using build I20061030-0010