HiveBrain v1.2.0
Get Started
← Back to all entries
patternjavaCritical

Java equivalent to #region in C#

Submitted by: @import:stackoverflow-api··
0
Viewed 0 times
equivalentregionjava

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

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.

Context

Stack Overflow Q#2344524, score: 231

Revisions (0)

No revisions yet.