Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse "align fields in columns" changed with Mars

When enabling the formatting option "align fields in columns" all member fields get aligned, like this:

  int    member1             = 1;
  int    member2WithLongName = 2;

  int    member3             = 3;
  String member4             = "asdf";

after switching to the Mars Release (4.5) this changed slightly. Members now get first grouped (by blank lines between them) and then aligned, resulting in an alignment like this for the above example:

int member1             = 1;
int member2WithLongName = 2;

int    member3 = 3;
String member4 = "asdf";

aligning is done based on the groups instead of based on all members.

Grouping members sometimes make sense to have a clear separation of static/final members / constants... Aligning based on these groups might make sense, too - but might screw up formatting between team members that use the latest release or older ones.

So the question is whether this can be configured to behave like previous releases. Or is this something only I experience and something went wrong when upgrading?

like image 915
icyerasor Avatar asked Jul 01 '15 18:07

icyerasor


1 Answers

There is "Blank lines separating independent groups" property in Neon.

like image 197
Alex Dvoretsky Avatar answered Nov 14 '22 23:11

Alex Dvoretsky