Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 68697

Summary: [projection] folding + move lines down/up can corrupt source
Product: [Eclipse Project] Platform Reporter: Christian Köstlin <christian.koestlin>
Component: TextAssignee: Platform-Text-Inbox <platform-text-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P2 CC: christof_marti
Version: 3.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
sample source to reproduce the observed bug none

Description Christian Köstlin CLA 2004-06-26 17:21:57 EDT
build: Release 3
Steps to reproduce:
- take attached source into a java projekt
- enable folding in such a way that the new Runnable is folded
- select the whole class display
- move the class to the end of the file by holding down alt-arrow-down until the
selection is at the end of the file

observed behavior:
the try block is at the end of the file
Comment 1 Christian Köstlin CLA 2004-06-26 17:22:49 EDT
Created attachment 12849 [details]
sample source to reproduce the observed bug
Comment 2 Christian Köstlin CLA 2004-06-26 17:23:45 EDT
i had to play a little to get the behavior on my computer so this could possibly
be a race condition.
Comment 3 Dani Megert CLA 2004-07-19 09:31:03 EDT
anything in .log?
Comment 4 Christian Köstlin CLA 2004-07-19 09:34:32 EDT
no .. nothing in logfile
Comment 5 Christof Marti CLA 2004-11-22 08:29:30 EST
Moving a line past a folded region seems to drag the projection annotation along
with the moved line leaving the first line of the folded region behind.
Eventually the annotation will unfold with the moved line and the 2nd and
consecutive lines from the original folded region as its content. When
unfolding, the selection is extended to the complete unfolded (and already
corrupted) region and the whole region is moved along while continuing to move
lines.
Comment 6 Christian Köstlin CLA 2005-10-24 05:49:27 EDT
i just got the effect again with build  I20050811-1530
will try a newer version.
steps to reproduce:
- i had an listeneradapter with empty implementation of the listenermethods.
- i added an //empty comment into one of the empty methods
- i copied the line and moved the line down fast by holding alt-arrowdown 
- sometimes when the selection is scrolled over a folded javadoc-comment the
selection gets corrupted and contains more than just the one line that should be
moved.
Comment 7 Tom Hofmann CLA 2005-12-15 13:24:20 EST

*** This bug has been marked as a duplicate of 62874 ***
Comment 8 Christian Köstlin CLA 2005-12-15 13:30:36 EST
im not sure if this is really an issue with folding/unfolding the code.
looked like it was a timing issue (because sometimes it could be observed and
sometimes not!)