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 231944 - Committing to Subversion resets code folding
Summary: Committing to Subversion resets code folding
Status: NEW
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Subversion (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Ondrej Vrabec
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-27 15:32 UTC by crazyjavahacking
Modified: 2013-07-09 09:40 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description crazyjavahacking 2013-06-27 15:32:59 UTC
It is quite annoying that Code Folding for Java editor is resetted every time the file is committed using Subversion.

Code folding should be persisted and not affected by version control committing.


NetBeans Dev 201306202301, JDK 7u15 32bit
Comment 1 Svata Dedic 2013-07-08 11:56:08 UTC
Do you by a chance use replaceable variables like $History:$, $Revision:$ or similar ?
Comment 2 Svata Dedic 2013-07-09 09:35:03 UTC
Verified with $Revision$ keyword. With keywords the document is reloaded from the disk and all content deleted/inserted again - all folding is lost then. Folding state remains if the file contains no keywords.

Moving as enhancement to VCS for evaluation; there are two ways out of the issue:
1/ instead of reloading the document, the document would be patched by diff between the memory doc and disk file contents. This will retain most of the text intact as well as folding or other offset-based markers.

2/ if folding system knows the operation is a 'reload', it might persist fold offsets prior to content clear, and restore them after content is loaded back. However if keyword expands the desired offsets may be shifted from the original position.