PHPz2017-04-17 11:38:37
I know there is a setting, but it only works for the part of a class that declares member variables...
Window > Preferences > Java > Formatter > Edit 那个 profile
然后在Indentaion中选择Spaces only或Tabs only,在Align fileds in columns上打勾
这样在使用Source > Format的时候就会自动对齐。
But you definitely don’t like to use Format manually every time, right...
在之前的Java下面,有一个Editor,选择Save Actions,选上Format source code > Format all lines
This will automatically adjust the format when saving. Of course, all of the above options require selecting Apply
, but you probably won’t forget it.