7.6.3 Custom Code Folding – C

To custom fold C code, do one of the following:

  • Type the following comments around your code:
    // <editor-fold defaultstate="collapsed" desc="user-description">
    C code block to fold
    // </editor-fold>

OR

  • Type fcom and press the Tab key to automatically enter the comment text above.

After the comment has been entered, customize it for your code:

defaultstateEnter either collapsed or expanded,
descEnter a description of the code. Once collapsed, this description can still be seen for reference.

An example of custom code folding is shown in Expand/Collapse Code Folding above.

For additional information see the NetBeans help topic:

ui.netbeans.org/docs/ui/code_folding/cf_uispec.html