Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 204960 - [formatter] Indentation 'Align fields in columns' is too greedy
Summary: [formatter] Indentation 'Align fields in columns' is too greedy
Status: CLOSED DUPLICATE of bug 479109
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-28 17:05 EDT by Nick T CLA
Modified: 2016-01-14 17:17 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick T CLA 2007-09-28 17:05:29 EDT
The 'Align fields in columns' selection on the 'Indentation' tab of the Formatter profile is a very useful tool, but behaves a bit too greedily when it comes to "groups" of fields (or variables).

It would be a great benefit if there was a way to specify the number of blank lines that the field aligner would skip before starting over on a new group.


For example, if the line limit was zero...

private int i;
private boolean yesNo;

private LongSupportClassNameThatTakesUpSpace supportOne;
private ShortSupport supportTwo;


private Oval circle;
private Rectangle square;


...would become...

private int     i;
private boolean yesNo;

private LongSupportClassNameThatTakesUpSpace supportOne;
private ShortSupport                         supportTwo;


private Oval      circle;
private Rectangle square;


...if the limit was one, it would become...

private int                                  i;
private boolean                              yesNo;

private LongSupportClassNameThatTakesUpSpace supportOne;
private ShortSupportClassName                supportTwo;


private Oval      circle;
private Rectangle square;


...and two would become...

private int                                  i;
private boolean                              yesNo;

private LongSupportClassNameThatTakesUpSpace supportOne;
private ShortSupportClassName                supportTwo;


private Oval                                 circle;
private Rectangle                            square;
Comment 1 Mateusz Matela CLA 2016-01-14 17:17:33 EST

*** This bug has been marked as a duplicate of bug 479109 ***