Friday 15 June 2012

IntelliJ IDEA empty constructor/method code style -



IntelliJ IDEA empty constructor/method code style -

how tweak inllij thought 14 code style java, create maintain closing brace of empty constructor/method right after opening one.

e. g. :

class="lang-java prettyprint-override">class { private a() {} public void b() {} }

go settings/code style/java/wrapping , braces , select these options:

keep when reformatting simple blocks in 1 line simple methods in 1 line simple classes in 1 line

that maintain code untouched while reformatting code:

if(true) {} public void foo() {} public class bar {}

i tested on intellij 13.1.5, work same way on 14 too.

intellij-idea

No comments:

Post a Comment