IntelliJ collapsing single line methods

2019-02-11 10:34发布

Since I've updated my version of intelliJ (14.x to 15.x) it has started automatically collapsing single line methods in the Java editor:

Previous version:

public void setContext(SecurityContext context) {
    this.context = context;
}

Latest version:

public void setContext(SecurityContext context) { this.context = context; }

Is there a way to prevent this? I find the original version much easier on the eyes!

Thanks.

2条回答
贪生不怕死
2楼-- · 2019-02-11 10:58

For mac, Code > Folding > Expand ALL/To Level

查看更多
看我几分像从前
3楼-- · 2019-02-11 11:02

Open 'Settings' from the File menu. Under 'Editor' -> 'General' -> 'Code Folding', you will find a 'Collapse by Default' section.

Simply uncheck 'One-line methods' and click OK.

查看更多
登录 后发表回答