Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Netbeans while/for blocks to collapse folding

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

Thanks.

like image 917
engtuncay Avatar asked Apr 12 '14 13:04

engtuncay


1 Answers

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.

like image 114
ollo Avatar answered Jan 03 '23 15:01

ollo