Reputation: 391
I started using IntelliJ IDEA to write Java, and one thing kinda annoys me. When I fold a one-line method, it looks like this:
.
Is there any way to make it look like this?
Upvotes: 2
Views: 1498
Reputation: 750
Settings -> Editor -> General -> Code Folding. There is an entry 'One-line methods', which is marked by default. You can uncheck this checkbox to get rid of inconvenient code folding. There are shortcuts for folding/unfolding single method by combination Ctrl + '-'
/Ctrl + '+'
, or all methods in a file by combinations Ctrl + Shift + '-'
/Ctrl + Shift + '+'
Upvotes: 4
Reputation: 6327
Its the behavior for short one-liners for more complex methods this will show as screenshot 2
Upvotes: -1