Community
Participate
Working Groups
The java coding conventions specify double indenting wrapped lines for if statements, methods, loops, etc. so that its easier to see where the body starts. from: http://java.sun.com/docs/codeconv/html/CodeConventions.doc3.html#262 Line wrapping for if statements should generally use the 8-space rule, since conventional (4 space) indentation makes seeing the body difficult. For example: //DON'T USE THIS INDENTATION if ((condition1 && condition2) || (condition3 && condition4) ||!(condition5 && condition6)) { //BAD WRAPS doSomethingAboutIt(); //MAKE THIS LINE EASY TO MISS } //USE THIS INDENTATION INSTEAD if ((condition1 && condition2) || (condition3 && condition4) ||!(condition5 && condition6)) { doSomethingAboutIt(); } //OR USE THIS if ((condition1 && condition2) || (condition3 && condition4) ||!(condition5 && condition6)) { doSomethingAboutIt(); }
Formatter is JDT/Core
This is improved with the new formatter. Fixed and released in HEAD. Regression test added.
Verified.