Question

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

Thanks.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top