I tried to find in formatter style preferences on eclipse to keep my array elements like that image :
Where can I find that style to modify it?
CodePudding user response:
You can configure this in Line Wrapping > Wrapping settings > Other expressions > Array initializers.
By the way, ... = new String[] { ...
can be shorten here to ... = { ...
(Eclipse provides a clean-up for that: Unnecessary Code > Create array with curly when possible).