This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
This IZ is a dup of CR 6538935. DESCRIPTION OF PROBLEM -------------------------------- If there is a #ifdef in the include-Block at the beginning of a source file, the code folding range for the include block stops at the first #include-Statement after the #ifdef. Instead, the code folding range should cover also the subsequent #include statements, and the #ifdef should be treated as nested within the range of the include block. STEPS TO DUPLICATE ------------------------- This can be easily seen with the following example: Put these lines in a file and open it with the editor in the IDE: #include <string.h> #include <socket.h> #ifdef TRACING #include <stdio.h> #endif #include <foo.h> #include <bar.h> A code folding range from string.h up to and including stdio.h is displayed. The last two include statements should be covered as well, and the #ifdef/#endif should be nested within this.
currently we have this folding: + #include <string.h> - #include <socket.h> + #ifdef TRACING | #include <stdio.h> - #endif + #include <foo.h> - #include <bar.h>
Major folding problem in this issue was solved. As for ifdef block: inside #ifdef block may be other declarations, not includes, so to be consistent with folding in other situations we will not put #ifdef block as sub block into includes folding block. Please file enhancement if you don't agree.
Verified