IntelliJ 折叠单线法

自从我更新了我的版本 intelliJ (14.x 到15.x) ,它已经开始在 Java编辑器中自动折叠单行方法:

上一版本:

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

最新版本:

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

有没有办法防止这种情况? 我发现原来的版本更容易的眼睛!

谢谢。

17014 次浏览

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.

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

On Windows:

Settings -> Editor -> General -> Code Folding -> Uncheck "One-line methods"