Bug 160823 - [formatter] Java Conventions [built-in] inserts blank line between field declarations
Summary: [formatter] Java Conventions [built-in] inserts blank line between field decl...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2.1   Edit
Hardware: PC Windows XP
: P3 normal with 3 votes (vote)
Target Milestone: 3.3 M3   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-13 03:47 EDT by Uwe Kubosch CLA
Modified: 2006-10-30 06:11 EST (History)
0 users

See Also:


Attachments
Proposed fix (1.01 KB, patch)
2006-10-23 23:15 EDT, Olivier Thomann CLA
no flags Details | Diff
Updated regression tests (4.00 KB, patch)
2006-10-23 23:16 EDT, Olivier Thomann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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