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 71487 - Large class with folded comments lead to loosing code
Summary: Large class with folded comments lead to loosing code
Status: RESOLVED WORKSFORME
Alias: None
Product: editor
Classification: Unclassified
Component: Code folding (show other bugs)
Version: 5.x
Hardware: All All
: P1 blocker (vote)
Assignee: issues@editor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-17 13:00 UTC by brviking
Modified: 2007-11-05 13:39 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 brviking 2006-01-17 13:00:42 UTC
Using NetBeans 5.0 RC1 on JDK 1.5.0_06, Win2K.

I'm didn't realized a reproducible steps, but I lost code I typed two times 
today (in about 2 hours of hard working with NetBeans editor).

With comments folded, start typing fast, using code-completion (either auto-
expand one option or choosing from suggestions), and in some point editor mess 
all the code (the plus sign appear at end or middle of lines - all the lines). 
Unique option is close discarding changes to not loose complete class.
Comment 1 Roman Strobl 2006-01-17 15:50:27 UTC
Did the class you were working on contain any guarded block? If the license
permits, can you attach the source code where this happened? Thanks.
Comment 2 Miloslav Metelka 2006-01-17 16:45:23 UTC
I've tried to reproduce on Linux even on large JComponent-size java sources but
it works fine. In the worst case the folds do not appear (if the parser gets
seriously confused) but there is no dataloss.
"(the plus sign appear at end or middle of lines - all the lines)" - do you mean
the gutter with the plus signs is painted in the middle of the line? If so could
you click back and forth into other app to check whether it's just sort of a
redrawing issue?
Ideally once the problem happens could you please attach a screenshot?
Did you try to save the file (backing-up the old version in an extra file)
whether the content is really lost? I'm asking because in NB editor the code
folding is only a special visual representation so there are no characters
physically inserted/removed in the underlying text buffer to achieve that.
Comment 3 Miloslav Metelka 2006-01-26 11:47:18 UTC
No response yet, closing as worksforme.