0

通常 Eclipse 会自动格式化初始化,如下所示:

createLog = false;
experimentDuration = 1;
rampUpInterval = 1.0;
rampUpNumUsersPerInterval = 1;
coolDownInterval = 1;
coolDownNumUsersPerInterval = 1;
numUsers = 1;
thinkTimeMinimum = 1000;
thinkTimeMaximum = 1000;

我想要一个自动格式化规则来格式化初始化,如下所示:

createLog                   = false;
experimentDuration          = 1;
rampUpInterval              = 1.0;
rampUpNumUsersPerInterval   = 1;
coolDownInterval            = 1;
coolDownNumUsersPerInterval = 1;
numUsers                    = 1;
thinkTimeMinimum            = 1000;
thinkTimeMaximum            = 1000;

有人知道我可以在哪里调整吗?

€dit:我想在构造函数中进行这种对齐。

提前致谢!

4

1 回答 1

1

转到Windows->Preferences->Java->Code Style->Formatter编辑活动配置文件并检查Align fields in column选项

在此处输入图像描述

于 2014-07-18T14:03:02.410 回答