开发者

Formatting array initializers with Eclipse

开发者 https://www.devze.com 2023-02-21 23:40 出处:网络
Is there any way I can instruct Eclipse\'s f开发者_StackOverflow中文版ormatter to put each value in an array initializer on a new line?You can do it this way:

Is there any way I can instruct Eclipse's f开发者_StackOverflow中文版ormatter to put each value in an array initializer on a new line?


You can do it this way: windows/preferences/java/code style/formatter, then near the selected active profile click edit

then on the "Line Wrapping" tab

Choose "Expressions"->"Array initializers"

Under The list choose "Wrap all elements, every element an a new line"


Go to windows/preferences/java/code style/formatter, then near the selected active profile click edit, then on the new lines tab there are 2 options for this.

0

精彩评论

暂无评论...
验证码 换一张
取 消