Issue
How can I configure Eclipse formatter to format simple if statement like
result = validate(object);
if (result != 'OK') {
return result;
}
to
result = validate(object);
if (result != 'OK') { return result; }
In other words: Keep If-statements including one statement in one line if possible. I checked New Lines > In control statements > 'if else' > Keep simple 'if' on one line
, but somehow it's not simple enough though.
Solution
Set New Lines > Keep braced code on one line > 'if then' statement body to If at most one item for that.
Answered By - howlger
Answer Checked By - Terry (JavaFixing Volunteer)