When working on C#, I often do this:
#region Properties
public int Property1{get;set;}
...(more properties)
#endregion
This makes Visual Studio add the option to fold the code inside the region. Offcourse, you can use regions for anything, it's not limited to Properties or anything at all.
I'm wondering 2 things:
One caveat to the folding reference:
Please note that the above examples are for java language. In other languages custom folds may not be supported or you may have to use different characters for marking line comments.
In NetBeans you can use Custom Folds, depending on the language:
// <editor-fold defaultstate="collapsed" desc="My Fold">
Your amazing code
// </editor-fold>
The attributes are optional. Without defaultstate
specified the region will default to expand (except for when you first wrap code in it!)
The latest Netbeans 8.1 has already this feature build in, You need just select you rows and then click on the "light bulb" icon, then select:
enter code hereSurround with // <editor-fold defaultstatus="collapsed" desc="comment">...
This is the source: http://wiki.netbeans.org/SurroundWithCodeFolding
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With