Java equivalent to #region in C#

c#, eclipse, folding, java

Solution

There's no such standard equivalent. Some IDEs - Intellij, for instance, or Eclipse - can fold depending on the code types involved (constructors, imports etc.), but there's nothing quite like `#region`.

Problem

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 ```

Original source

Related problems