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.
[ BUILD # : 200408171800 ] [ JDK VERSION : J2SE 1.4.2 ] Sometimes a folded method block can't be expanded with neither the plus or pressing Ctrl+. I haven't found a sure way to reproduce this behavior but it seems to happen more often (maybe only) when the file is opened through some indirect action such as "Go To Class" or clicking link in the compiler error output. Nothing in log. Expanding all always work in these cases. Sorry I can't be more specific. If I find some reproducable pattern I'll add a comment.
If that happens could you pleasd press Alt+Shift+Q - it should dump the list of folds etc. Could you please take the log file of the IDE then and attach it to this issue? Thanks.
*** Issue 47761 has been marked as a duplicate of this issue. ***
Comment from issue #47761 : "I had a syntax error (but not lexical) in my source code and clicking on the grey [+] square for expanding a collapsed folder did not expand the folder (but the [+] mark has changed to [-]). (The syntax error was in the method below the folder I wanted to expand.) But I could expand the folder by double-clicking on the [{...}] mark. Once I expanded the folder this way, clicking on [-]/[+] started to work."
Created attachment 17116 [details] Log file
Created attachment 17118 [details] Screen shot. The third fold is collapsed, but has the minus sign.
It happened again. I am attaching the log and the file which was open when I pressed Alt-Shift-Q.
Created attachment 17120 [details] session info + fold info
Created attachment 17122 [details] test Java file
in both attached dumps, each fold has itself as a children, this is abnormal and it probably causes the problem...
I'm working on the fix.
Should be fixed now. I've done somewhat broader change that eliminated some oddities in the NbJavaFoldManager. Fixed in trunk: Checking in src/org/netbeans/modules/editor/java/NbJavaFoldManager.java; /cvs/editor/src/org/netbeans/modules/editor/java/NbJavaFoldManager.java,v <-- NbJavaFoldManager.java new revision: 1.15; previous revision: 1.14
I just reproduced this bug with the latest Q-build (200409100847). I use J2SE 5.0 RC (JDK 1.5 RC) on Linux, running on Intel. I could not expand code of constructor of class org.netbeans.modules.i18n.java.JavaResourceHolder from the I18n module (see http://i18n.netbeans.org/source/browse/i18n/src/org/netbeans/modules/i18n/java/JavaResourceHolder.java?rev=1.12&content-type=text/x-cvsweb-markup). I tried to expand the code by clicking on [+] in the left margin of the editor. I will attach the fold hierarchy dump (produced by clicking Alt-Shift-Q in the editor).
Created attachment 17662 [details] fold hierarchy dump (when this bug was reopened)
I see - there are duplicate folds created for the same boundaries which causes the problem. I expect that you've done a bunch of modifications to the file prior this problem happened, did you?
No, I did not make any modifications. I just opened the file and clicked on [+].
*** Issue 50202 has been marked as a duplicate of this issue. ***
Changed subcomponent to code folding.
Changed target milestone to TBD.
Hi, do not you plan to fix this issue in NetBeans 4.1? I consider it a P2 from the usability perspective. It happens every day. Please try to set the options so that all folds are collapsed by default and then try to use the editor yourself! You will see how often it happens. When the settings are changed this way code folding is a usability barrier - there are more problems. I will try to describe some more of them so that you can easily track down the cause.
We will certainly attempt to fix this into 4.1. I hope that we will finally resolve this.
Fixed in [maintrunk]. Checking in NbJavaFoldManager.java; /cvs/java/editor/src/org/netbeans/modules/editor/java/NbJavaFoldManager.java,v <-- NbJavaFoldManager.java new revision: 1.7; previous revision: 1.6 done
Verified in build 050314.