Reputation: 435
is there any way to format if-else
statement in Eclipse where multiple conditions come in each line while pressing Ctrl+Shift+F?
I tried to fiddle around in Preferences -> Java -> Code Style -> Formatter
, but was not able to find the right option to get it working.
The format that i am trying to achieve is as follows.
if(condition1 == true
&& condition2 == true
&& condition3 == true
&& condition4 == true
&& condition5 == true) {
return 0;
}
Any suggestions?
Upvotes: 2
Views: 2346
Reputation: 351
Sadly you can't do what you want using Code Style -> Formatter, but yes, writing in parenthesis will work.
Upvotes: 0
Reputation: 430
May be your requirement adjusted in below confirguration.
Preferences -> Java -> Code Style -> Formatter -> Edit
Upvotes: 1