how to organize the code similar to #region/#endregion in .NET?

Niko Gamulin picture Niko Gamulin · Sep 29, 2009 · Viewed 14.9k times · Source

While the code is growing big it is getting harder and harder to keep everything well organized. One thing I liked very much the time I developed in .NET was #region/#endregion which enabled to organize the code in logical groups and made further organization much easier.

Does anyone know whether there is any similar code organization possible in Java?

Answer

Dweep Sharma picture Dweep Sharma · Apr 1, 2011

This works in netbeans:

// <editor-fold defaultstate="collapsed" desc=" Region Name ">

... Enter Code Block here ...

// </editor-fold>