IntelliJ IDEA one-line function formatting

后端 未结 2 1341
情书的邮戳
情书的邮戳 2020-12-05 17:13

IntelliJ keeps formatting this:

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

into this:

public voi         


        
相关标签:
2条回答
  • 2020-12-05 17:20

    below is the shortcut for Merge multiple lines into a line -

    Ctrl+Shift+J

    0 讨论(0)
  • 2020-12-05 17:41

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

    0 讨论(0)
提交回复
热议问题