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 217322

Summary: [PHP folding] Turning off code folding in options should always expand all folds
Product: editor Reporter: _gt
Component: CSL (API & infrastructure)Assignee: Svata Dedic <sdedic>
Status: RESOLVED FIXED    
Severity: normal Keywords: USABILITY
Priority: P3    
Version: 7.2   
Hardware: PC   
OS: Windows 7   
URL: http://www.globtek.info/images/20120823173341762.png
Issue Type: DEFECT Exception Reporter:

Description _gt 2012-08-23 17:39:27 UTC
Product Version = NetBeans IDE 7.2 (Build 201207171143)
Operating System = Windows 7 version 6.1 running on x86
Java; VM; Vendor = 1.7.0_05
Runtime = Java HotSpot(TM) Client VM 23.1-b03


Turning off code folding under Options > General should always expand all folded code blocks. Currently it turns off the folding margin in the editor and disables the Code Folds menu, leaving no apparent way to get your code back. Using the Ctrl-Shift-+ shortcut or double clicking the fold marker works.

Clicking save in options momentarily expands the folds, but then they fold back again.

Screenshot at URL.
Comment 1 _gt 2012-08-23 18:04:46 UTC
Unchecking the "Collapse by Default" suboptions has corrected the behavior.

It seems like the Collapse by Default options are in effect whether Use code folding is checked or not. I'm not sure if this is a feature or a bug.

Maybe to change the options dialog and rename "Use code folding" to something like "Show folding margin" and leave the Collapse by default options always enabled
Comment 2 Ondrej Brejla 2012-08-24 08:13:14 UTC
Sorry, but afaik it's not handled by PHP module, we just provide offset ranges to fold. Nothing else. Probably CSL or whole editor issue?
Comment 3 Milutin Kristofic 2012-09-13 13:57:52 UTC
Svata, can you please look at this. You are more familiar with folding.
Comment 4 Svata Dedic 2012-09-13 15:16:26 UTC
Changeset: 1623e702d3fe
Author:    Svata Dedic <sdedic@netbeans.org>
Date:      2012-09-13 17:16
Message:   Issue #217322 - [PHP folding] Turning off code folding in options should always expand all folds: fixed
When folding is disabled, do not even collect fold infos from StructureScanner.
Comment 5 Quality Engineering 2012-09-15 02:09:45 UTC
Integrated into 'main-golden', will be available in build *201209150001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/1623e702d3fe
User: Svata Dedic <sdedic@netbeans.org>
Log: Issue #217322 - [PHP folding] Turning off code folding in options should always expand all folds: fixed
When folding is disabled, do not even collect fold infos from StructureScanner.