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

Bug 302343

Summary: Pastes a random number of times and in different places of an open class what it has being deleted before
Product: [Eclipse Project] Platform Reporter: Alfonso Parra <arpcus>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: cbotos, eclipse.felipe, ericwill, pinnamur, remy.suen
Version: 3.5Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Alfonso Parra CLA 2010-02-09 17:53:11 EST
Build Identifier: I have tried with several ones

I have found it in different versions of Galileo and in one of Ganymede on Centos 4.7 and Centos 5.2
It pastes previously deleted text and ctrl Z removes what has being pasted one at a time.

Reproducible: Always

Steps to Reproduce:
1. Delete some text
2. Keep doing what you were doing
3. One of the open classes will show multiple errors.
   You can remove them deleting them or with crl Z
Comment 1 Boris Bokowski CLA 2010-02-16 10:45:51 EST
Sending to SWT - any idea what could be causing this, or how Alfonso can help us understand what's happening?
Comment 2 Alfonso Parra CLA 2010-02-19 12:09:33 EST
I tried to take some screen shots to document the bug: "Here you can see two classes with no errors", "I am going to delete this line", etc., but when I did it, nothing happened, no pasting whatsoever.
The bug just disapeared.
I assume, but have no proof that the bug has something to do with the clipboard and the screen shots interfered somehow.
Now everything is back to normal and the bug is acting as described.
If I can help in anyway, please let me know.

Alfonso
Comment 3 cbotos CLA 2010-07-30 09:45:27 EDT
Version: 3.4.2
Build id: M20090211-1700
Redhat Linux
I believe this is what I am seeing.  The paste buffer will occasionally randomly be inserted into (somewhat) random places in the file being edited.  Sometimes if there is just one occurrence of the insertion and I delete the inserted text, upon a 'save' the same text will appear further down in the file.  Repeated <ctrl>z will remove the text (as well as anything I added before noticing it).  *Sometimes* the text will be unrelated to anything I am editing, including random text that seems to be part of a Thunderbird email message!?!?
This *may* be reproduced by 
(1) copy some text, 
(2) highlight some other text, 
(3) <ctrl>v to replace the selected text with the copied text.
(4) Save
(4) Wait a while or do other things.  Random insertion(s) may occur.
Comment 4 Praveen CLA 2010-09-07 13:35:36 EDT
I wonder whether this is due to bug#153809. Can you please try with the latest version of Eclipse, or does the problem go away if you disable Klipper/Glipper on your Linux machine ?
Comment 5 Alfonso Parra CLA 2010-09-08 15:35:23 EDT
As to comment #4 from Praveen:

The bug has not being removed from Helios Eclipse.
I am using Centos 4.8 and I do not know how to deactivate Gliper if present in that Centos 

The bug is more bothersome that harmful, except in the cases in which the pasting occurs on places where it makes sense for the compiler, so it is not marked as an error, in those cases it is very difficult to find what went wrong with the program.
Comment 6 Felipe Heidrich CLA 2010-09-09 15:49:43 EDT
I don't think this API makes sense for StyledText.
To restore the editor we would need to save
the text
the styles
the selection
the bounds
the horizontal/vertical scroll offset
the font
the foreground/background
other line attributes (alignment, justify, wrap, indent, wrapIndent)
bidi segments
etc

closing as won't fix.

on a side note, I tested setTopPixel() and it worked fine, please report a bug if you have case where it fails.
Comment 7 Felipe Heidrich CLA 2010-09-09 15:53:32 EDT
my appologies, obviously I post the comment in the wrong bug report. please ignore it.
Comment 8 Eric Williams CLA 2018-05-15 15:10:59 EDT
I cannot reproduce this on GTK3.22, 4.8 M7, and Fedora 28.