IntelliJ collapsing single line methods

点点圈 提交于 2019-12-18 03:03:06

问题


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.


回答1:


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.




回答2:


On Windows:

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




回答3:


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



来源:https://stackoverflow.com/questions/35995083/intellij-collapsing-single-line-methods

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!