I'm using the NetBeans IDE. Normally, every PHP file in my project has code folds:
However, one PHP file in my project doesn't have code folds:
The file has no syntax errors. I've tried restarting NetBeans and reopening the project and the folds still do not appear. What could it be?
More info:
.php
like all the PHP files in my project.The third class of NetBeans code folding is customized code folding where the developer marks sections of code that he or she wants to support NetBeans code folding. The last example of the servlet generation showed the syntax that developers can use to implement custom folding.
Because it is automatic in NetBeans, there is no trace of any special treatment of important statements in the source code. Anyone looking at the source code in an alternate editor that doesn't itself fold import statements will just see the lines of code like shown next:
NetBeans offers automatic code folding for Javadoc comments similar to what it provides for import statements. I will again use the example code from my EasyMBean blog example to illustrate NetBeans's code folding of Javadoc comments.
I recently switched from Vim to Netbeans. Show activity on this post. To filter out CSS parsing errors, Open CSS file that contains error and when you click on the error bulb (Which appears at the error line) you can see an option as 'filter out CSS parsing errors in 'yourprojectname''. Click it.
@ sudhir chauhan: If code folds wasn't already selected the other php files would not have folds alredy.
This is a known bug with Netbeans that is very annoying and happens occasionally to me as well when editing PHP. The only solution is to save the file, close the Netbeans IDE and re-open Netbeans.
Also sometimes you unfold code and click to refold and you cant.. to resolve this related issue just click on a line outside the fold (ie. the function above) then click on the "-" to refold the code.
This problem persists in Netbeans 7.2.1, not only with PHP, but also with java code, the way that works for me is to uncheck [Use code fold:] as described in o0omycomputero0o's answer, apply changes by clicking OK, then recheck [Use code folding:], and click OK, it sort of re-validates the code folds to the expected state, No IDE reload needed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With