Java equivalent to #region in C#

Pentium10 picture Pentium10 · Feb 26, 2010 · Viewed 244.2k times · Source

I want to use regions for code folding in Eclipse; how can that be done in Java?

An example usage in C#:

#region name
//code
#endregion

Answer

Alexander Bezrodniy picture Alexander Bezrodniy · Oct 18, 2012

Jet Brains IDEA has this feature. You can use hotkey surround with for that (ctrl + alt + T). It's just IDEA feature.

Regions there look like this:

//region Description

Some code

//endregion