How to tweak InlliJ IDEA 14 code style for Java, to make it keep closing brace of empty constructor/method right after opening one.
E. g. :
class A {
private A() {}
public void b() {}
}
Go to Settings/Code style/Java/Wrapping and Braces and select these options:
That will keep code like this untouched while reformatting your code:
if(true) {}
public void foo() {}
public class Bar {}
I tested this on IntelliJ 13.1.5, but hopefully it will work the same way on 14 too.
Isn't this the default behaviour of IntelliJ 14? At least in my version it is. As soon as I open curly bracket it gets closed automatically on the same line.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With