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 231362 - Folding settings are not saved
Summary: Folding settings are not saved
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Code folding (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords: RANDOM
Depends on:
Blocks:
 
Reported: 2013-06-17 13:22 UTC by Jiri Prox
Modified: 2013-06-25 14:57 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 Jiri Prox 2013-06-17 13:22:30 UTC
Sometimes, the language specific enabling setting is not saved.

Steps to reproduce (from the fresh userdir):
1) open java file 
2) open options, disable code folding for all languages
3) confirm dialog
4) open options, enable code folding for java
5) confirm dialog
-> folding is enabled
6) open options again
-> checkbox 'Enable Code Folding' for java is not selected
7) close options by pressing cancel
-> folding disappears 

Product Version: NetBeans IDE 7.4 Beta (Build 201306132201)
Java: 1.7.0_25; Java HotSpot(TM) 64-Bit Server VM 23.25-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b15
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
User directory: C:\Users\jprox\AppData\Roaming\NetBeans\7.4beta
Cache directory: C:\Users\jprox\AppData\Local\NetBeans\Cache\7.4beta
Comment 1 Svata Dedic 2013-06-18 12:51:04 UTC
Sadly not reproducible on my machine - possibly some threading issue. Please try to reproduce after the changeset http://hg.netbeans.org/jet-main/rev/9134bfe332de
 gets to the test build

Please use the system property -J-Dorg.netbeans.api.editor.fold.FoldHierarchy.enabled.level=100 when starting NetBeans. When the defect happens, please back up your $userdir/config/Editors immediately and attach to this defect.
Comment 2 Svata Dedic 2013-06-21 10:56:16 UTC
Reproduced similar case when opening a new file. It is caused by migration code, which attempted to clean up redundant preferences from older releases. Because it is not really possible to tell whether the preferences were already migrated, the 'enabled' flag was reset to the 'all languages' value in some situations.

fixed in http://hg.netbeans.org/jet-main/rev/7a469940f56f

The following has to be re-tested:

* Change All languages folding to disable. Opened editors must loose their folding sidebars, newly opened editors open without folding. Settings in config/Editors/**/*CustomPreferences.xml must loose the 'code-folding-enable' value.

* Change folding for a specific language to enable. Opened editors must display folding. 

* Change All languages folding to enable again. In addition to visual changes, the preference value overriden for the specific language in step 2 must be cleared (no value for code-folding-enable should be present)

* Migrate settings from 7.3; check the above works the same was as with clean userdir.
Comment 3 Quality Engineering 2013-06-23 02:09:22 UTC
Integrated into 'main-golden', will be available in build *201306222301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/9134bfe332de
User: Svata Dedic <sdedic@netbeans.org>
Log: #231362: Additional logging provided
Comment 4 Jiri Prox 2013-06-25 14:57:06 UTC
verified