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
- Control statements in one line
- Simple blocks in one line
- Simple methods in one line
Didn't help.
intellij-idea Share Improve this question asked Mar 29 '16 at 20:43 Atte Juvonen 4,24055 gold badges3737 silver badges7575 bronze badges- 3 Possible duplicate of IntelliJ collapsing single line methods – Matthew Simoneau Sep 9 '16 at 17:18
2 Answers
ActiveOldestVotes 92Look in Preferences (or Settings), Editor, General, Code Folding, Collapse by default, One-line methods
answere标签:function,sheet,share,formatting,line,data,post,se 来源: https://www.cnblogs.com/kungfupanda/p/15506552.html