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 207657 - Code fold for generated code does not expand
Summary: Code fold for generated code does not expand
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Code folding (show other bugs)
Version: 7.2
Hardware: PC Windows 7 x64
: P1 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-24 00:27 UTC by Chiana
Modified: 2013-01-28 17:19 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chiana 2012-01-24 00:27:54 UTC
[ BUILD # : 201201180601 ]
[ JDK VERSION : 1.6.29 ]

When you try to expand the code fold for the generated code, it does not.
This has worked earlier and as such it is a regression.

When IDE is newly started and files are opened in source mode you can expand
the fold, but if you switch to design mode, and then back, the folds could no
longer be expanded. Also if you close and load a file you can't expand the fold
either.

This report is specific to the "generated code" fold as for what I can see no
other folds have this problem.
Comment 1 Chiana 2012-01-24 00:35:53 UTC
Also, just checked the following; disabled code folding in options, and it can't be expanded at all, it is still folded down with no way of unfolding.

I tried restarting the IDE after changing the option but no change.
Also after restoring the option to use code folding you can expand the fold but then it can no longer be folded down (same problem but the other way around...)
Comment 2 Jiri Prox 2012-01-25 09:45:04 UTC
reproducible,

the fold can be expanded by double click but not by key shortcut.

Anyway, please fix it ASAP, this is highly visible bug. Thanks
Comment 3 Svata Dedic 2012-01-27 10:47:36 UTC
Note - if you open the file in source mode (e.g. using right-click - Edit), folding is OK.

According to the debugger, there are several rounds of rebuildManagers() calls when the file is opened in Design mode. It seems that already released managers attempt to push their folds to the current set (and they succeed !), so there's a parent+child occupying the same range for the "Generated code" block.
Comment 4 Svata Dedic 2012-01-27 12:21:10 UTC
Changeset: c29d16a0f508
Author:    Svata Dedic <sdedic@netbeans.org>
Date:      2012-01-27 13:20
Message:   #207657: fixed race between reparenting the Editor view in a multiview container. Added consistency check that rejects Fold updates from already released managers.
Issue #207657 - Code fold for generated code does not expand: fixed
Comment 5 Chiana 2012-01-27 12:43:25 UTC
Oki, I'll check it out as soon as it gets into the build...
Comment 6 Chiana 2013-01-28 17:19:49 UTC
Wonder why I've not verified this earlier