Home > Mobile >  How can I keep array elements with specific arrangement in formatter style [eclipse]
How can I keep array elements with specific arrangement in formatter style [eclipse]

Time:02-01

I tried to find in formatter style preferences on eclipse to keep my array elements like that image :

enter image description here

Where can I find that style to modify it? enter image description here

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).

As the following image shown: enter image description here

  • Related