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 169317 - Code folds every time document structure changed
Summary: Code folds every time document structure changed
Status: NEW
Alias: None
Product: xml
Classification: Unclassified
Component: Text-Edit (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: issues@xml
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-28 13:01 UTC by aekold
Modified: 2009-07-29 09:18 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
file to reproduce problem (37.22 KB, text/xml)
2009-07-28 13:02 UTC, aekold
Details

Note You need to log in before you can comment on or make changes to this bug.
Description aekold 2009-07-28 13:01:24 UTC
Product Version: NetBeans IDE 6.7 (Build 200906241340)
Java: 1.6.0_14; Java HotSpot(TM) Client VM 14.0-b16
System: Windows XP version 5.1 running on x86; Cp1251; ru_RU (nb)
Userdir: D:\develop\labs\nbprofile67

All folding checkboxes in preferences are checked. When document folded and I am unfolding one section and using it as 
example to write another similar section - with any document structure change manually unfolded block folds back, and I 
have to unfold it once again.
Comment 1 aekold 2009-07-28 13:02:48 UTC
Created attachment 85327 [details]
file to reproduce problem
Comment 2 aekold 2009-07-28 13:07:17 UTC
Steps to reproduce:
(I am using line numbers from attached file)
1. Check all folding checkboxes in preferences.
2. Open build-impl.xml (from attachment or any of your projects).
3. Unfold block at line 678 and all it's subblocks.
3. Go to line 685
4. After line 685 start typing another <target

Expected result: block at line 678 will stay unfolded if it was unfolded manyally
Actual result: block at line 678 folded back, manual unfolding required to see it again.
Comment 3 Vitezslav Stejskal 2009-07-29 09:18:30 UTC
IMO this is a problem in XML fold manager, which always creates new folds instead of reusing existing ones. The
infrastructure applies the folding rules to any newly created fold.