You can do this as follows: windows / preferences / java / code style / formatter, then click edit next to the selected active profile
then on the line packaging tab
Choose Expressions → Array Initializers
In the list, select "Wrap all items, each item a new line"
wutzebaer
source share