How to create named code blocks in Intellij?

They have implemented region-support now!

From http://youtrack.jetbrains.com/issue/IDEA-80636

Currently Intellij IDEA supports two basic types of custom folding comments:

NetBeans-like:

//<editor-fold desc="...">
... code ...
//</editor-fold>

And VisualStudio-like:

//region <...>
... code ...
//endregion

Note that line commenting symbols for “region…endregion” can be changed from “//” to “#” if the ‘#’ character is supported by a language. But by default custom folding comments use the same comment characters as normally used for language line comments.
Instead of typing the comments manually, in many cases you can use Ctrl+Alt+T (surround with).
Please submit separate issues if you find that something doesn’t work as expected.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)