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.

Bug 47416 - [40cat] Folded method can't be expanded
Summary: [40cat] Folded method can't be expanded
Status: CLOSED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Code folding (show other bugs)
Version: 4.x
Hardware: PC All
: P3 blocker (vote)
Assignee: Miloslav Metelka
URL:
Keywords: USABILITY
: 47761 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-08-18 19:46 UTC by gugrim
Modified: 2007-11-05 13:39 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Log file (238.90 KB, text/plain)
2004-08-25 11:02 UTC, pfelenda
Details
Screen shot. The third fold is collapsed, but has the minus sign. (53.43 KB, image/png)
2004-08-25 11:04 UTC, pfelenda
Details
session info + fold info (17.86 KB, text/plain)
2004-08-25 11:13 UTC, Marian Petras
Details
test Java file (6.11 KB, text/plain)
2004-08-25 11:16 UTC, Marian Petras
Details
fold hierarchy dump (when this bug was reopened) (19.78 KB, text/plain)
2004-09-15 15:47 UTC, Marian Petras
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gugrim 2004-08-18 19:46:19 UTC
[ 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.
Comment 1 Miloslav Metelka 2004-08-23 12:50:17 UTC
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.
Comment 2 Martin Roskanin 2004-08-24 08:09:34 UTC
*** Issue 47761 has been marked as a duplicate of this issue. ***
Comment 3 Martin Roskanin 2004-08-24 08:11:00 UTC
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."
Comment 4 pfelenda 2004-08-25 11:02:24 UTC
Created attachment 17116 [details]
Log file
Comment 5 pfelenda 2004-08-25 11:04:37 UTC
Created attachment 17118 [details]
Screen shot. The third fold is collapsed, but has the minus sign.
Comment 6 Marian Petras 2004-08-25 11:12:23 UTC
It happened again. I am attaching the log and the file which was open
when I pressed Alt-Shift-Q.
Comment 7 Marian Petras 2004-08-25 11:13:12 UTC
Created attachment 17120 [details]
session info + fold info
Comment 8 Marian Petras 2004-08-25 11:16:52 UTC
Created attachment 17122 [details]
test Java file
Comment 9 Martin Roskanin 2004-08-25 15:04:35 UTC
in both attached dumps, each fold has itself as a children, this is
abnormal and it probably causes the problem...
Comment 10 Miloslav Metelka 2004-08-26 09:09:30 UTC
I'm working on the fix.
Comment 11 Miloslav Metelka 2004-08-27 17:26:42 UTC
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
Comment 12 Marian Petras 2004-09-15 15:43:59 UTC
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).
Comment 13 Marian Petras 2004-09-15 15:47:14 UTC
Created attachment 17662 [details]
fold hierarchy dump (when this bug was reopened)
Comment 14 Miloslav Metelka 2004-09-15 16:41:13 UTC
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?
Comment 15 Marian Petras 2004-09-16 05:43:18 UTC
No, I did not make any modifications. I just opened the file and
clicked on [+].
Comment 16 Martin Roskanin 2004-10-19 15:26:10 UTC
*** Issue 50202 has been marked as a duplicate of this issue. ***
Comment 17 Roman Strobl 2004-12-07 15:29:47 UTC
Changed subcomponent to code folding.
Comment 18 Roman Strobl 2005-01-10 13:21:34 UTC
Changed target milestone to TBD.
Comment 19 Marian Petras 2005-01-19 13:20:34 UTC
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.
Comment 20 Miloslav Metelka 2005-01-19 15:01:56 UTC
We will certainly attempt to fix this into 4.1. I hope that we will
finally resolve this.
Comment 21 Dusan Balek 2005-02-24 16:19:25 UTC
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
Comment 22 Marian Petras 2005-03-15 09:43:16 UTC
Verified in build 050314.