其他分享
首页 > 其他分享> > IntelliJ IDEA one-line function formatting

IntelliJ IDEA one-line function formatting

作者:互联网

https://stackoverflow.com/questions/36294708/intellij-idea-one-line-function-formatting

 

65

IntelliJ keeps formatting this:

public void addElement(Element elem) {
    this.elements.add(elem);
}

into this:

public void addElement(Element elem) { this.elements.add(elem); }

I prefer the multi-line formatting. How can I tell this to IntelliJ? I have unchecked the following boxes in Settings -> Editor -> Java -> Wrapping and Braces

Didn't help.

Share Improve this question   asked Mar 29 '16 at 20:43 Atte Juvonen 4,24055 gold badges3737 silver badges7575 bronze badges Add a comment

2 Answers

ActiveOldestVotes 92  

Look in Preferences (or Settings), Editor, General, Code Folding, Collapse by default, One-line methods

enter image description here

    answere

标签:function,sheet,share,formatting,line,data,post,se
来源: https://www.cnblogs.com/kungfupanda/p/15506552.html