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.
To collapse or expand all code fragments, press Ctrl+Shift+NumPad - / Ctrl+Shift+NumPad + . IntelliJ IDEA collapses or expands all fragments within the selection, or, if nothing is selected, all fragments in the current file, for example, all methods in a file.
Go to File -> Settings -> Editor -> General -> Code FoldingUncheck Show code folding outline.
The action is called Collapse All and the default shortcut is Ctrl + NumPad - on Windows and Cmd + - on Mac (the project view has to be focused).
In the Settings/Preferences dialog ( Ctrl+Alt+S ), go to Editor | Code Style. Switch to the Formatter tab and in the Do not format field, enter the files and directories that you want to exclude using a glob pattern. , the field will expand, and each pattern will be shown on a separate line.
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.
On Windows:
Settings -> Editor -> General -> Code Folding -> Uncheck "One-line methods"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With