iibrahimbakr
iibrahimbakr

Reputation: 1134

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

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

Upvotes: 1

Views: 49

Answers (1)

howlger
howlger

Reputation: 34137

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

Upvotes: 1

Related Questions