Java equivalent to #region in C#

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

24 s
24

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

Leave a Comment