Reputation: 141
currently my codes i look like this and
holder a=new holder(a,s,c,v,b,n,q,w,e,r);
i want it to look like this
holder a=new holder(a,
s,
c,
v,
b,
n,
q,
w,
e,
r);
dose any one knew how can i do this with auto format ctrl+shift+f
Upvotes: 1
Views: 223
Reputation: 1630
Eclipse 4.2
Code format --> Line Wrapping --> Function Calls --> Object Allocation Arguments
Choose "Wrap all elements, Every element in new line"
Upvotes: 1
Reputation: 126
All options regarding Eclipse's Automated Formatting can be found by going to Window -> Preferences then choosing Java -> Code Style -> Formatter. Click on the Edit... button and change the formatting options as you like.
Although I'm unsure whether the specific configurations of arguments you want is easy to configure. Clicking on the New Lines tab and looking at Array Initializers the configuration you want is unavailable.
It might be hidden somewhere else but I doubt it.
Upvotes: 1