IntelliJ Idea fold if and other statements in JavaScript, but not in Java. How can I get this feature? Maybe you know some plugin or settings?
I don't think that it's possible from Code > Folding or using the icons from the left bar (collapse/expand), but you can do it in a harder way: manually.
E.g.:
...
instead of that block