http://www.jindent.com |
|
Next: Annotations |
Wrap after for-each colon : |
always
:
public class ClassA { | public void method() { | for (MyVariable variableName : | getCollectionFromSomewhere(a, b, c, d, e, f)) { | // ... | } | } | } | |
never
:
public class ClassA { | public void method() { | for (MyVariable variableName : getCollectionFromSomewhere(a, b, c, d, e, f)) { | // ... | } | } | } | |
on demand
:
public class ClassA { | public void method() { | for (MyVariable variableName : | getCollectionFromSomewhere(a, b, c, d, e, f)) { | // ... | } | } | } | |
if line exceeds
:
public class ClassA { | public void method() { | for (MyVariable variableName : | getCollectionFromSomewhere(a, b, c, d, e, | f)) { | // ... | } | } | } | |
Wrap after points . on demand |
import aaa.bbb.ccc.ddd.eee.fff.ggg.hhh.iii.jjj.kkk.lll.mmm.nnn.ooo.ppp.qqq.rrr | .sss.ttt.uuu.vvv.www.xxx.yyy.zzz.*; | import aaa.bbb.ccc.ddd.eee.fff.ggg.hhh.iii.jjj.kkk.lll.mmm.nnn.ooo.ppp.qqq.rrr | .sss.ttt.uuu.vvv.www.xxx.yyy.zzz.BigClassName; | |
import aaa.bbb.ccc.ddd.eee.fff.ggg.hhh.iii.jjj.kkk.lll.mmm.nnn.ooo.ppp.qqq.rrr.sss.ttt.uuu.vvv.www.xxx.yyy.zzz.*; import aaa.bbb.ccc.ddd.eee.fff.ggg.hhh.iii.jjj.kkk.lll.mmm.nnn.ooo.ppp.qqq.rrr.sss.ttt.uuu.vvv.www.xxx.yyy.zzz.BigClassName; |
Wrap after left parentheses ( on demand |
if (x == 0) | { | stringBuffer = new StringBuffer("a pretty long String value which is not easy to wrap"); } | |
if (x == 0) | { | stringBuffer = new StringBuffer( | "a pretty long String value which is not easy to wrap"); | } | |