5

I use netbeans 8 rc1 , as older version, netbeans does not fold while/for blocks, is there any way to do enable this ?

Thanks.

ollo
  • 24,797
  • 14
  • 106
  • 155
engtuncay
  • 867
  • 10
  • 29

1 Answers1

9

This is not possible in java (and c/c++) at the moment (see enhancement bugs #209041, #222493, #233225 and #209784).

As a workaround you can use NB's code folding:

//<editor-fold defaultstate="collapsed" desc="An example of a loop">
while( what != ever )
{
   ever++;
}
//</editor-fold>

Just mark the code you want to wrap into a folding and click on the yellow "hint bulb" and you can select folding there.

Btw, you can change the values of defaultstate and desc.

ollo
  • 24,797
  • 14
  • 106
  • 155