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

Bug 64507

Summary: Copy and Paste problem
Product: [Eclipse Project] Platform Reporter: Sanjay Lalwani <sanjay_lalwani>
Component: UIAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: eclipse, f.sauter, jose
Version: 3.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Sanjay Lalwani CLA 2004-05-28 05:01:08 EDT
Hi,
I Found sometimes Copy Paste feature dont work at all.
If you try to select a line from right to left and then press ctrl+C 
and if you try to paste by ctrl+V it doesnt work.

is this a known problem?
This keeps occuring to me..
Comment 1 Basil V CLA 2004-05-28 12:00:01 EDT
I've noticed that the copy action sometimes ends up disabled in the java 
editor, even when a text block is selected, which means that ctrl-C won't work 
(since the action is disabled).  You can check whether the copy action is 
enabled or not by checking the Edit menu.  

This problem occurs for me on version 3.0M9 (I haven't seen it in earlier 
versions), running on Windows 2000.  

I haven't found a consistent way to reproduce the problem.  But once it occurs, 
there seems to be no way to get the copy action enabled for that editor. (I 
can't remember if closing file and reopening fixes problem or not).
Comment 2 Paul CLA 2004-06-14 04:56:38 EDT
I find the same - i.e. selecting text and pressing "Ctrl-C" or "Ctrl-X" will 
not place the highlighted text onto the clipboard/copy buffer....

However it only seems to happen when there is an error in the file you are 
attempting to copy from.

The menu option is still available to copy the text and this still works ok.

Paste still works, however what is pasted is the previously copied or cut value.
Comment 3 Jose M Beleta CLA 2004-06-30 12:57:49 EDT
I experienced the same problem with 3.0 release. Closing and reopening the 
editor seems to solve the problem. It is very annoying.
Comment 4 Jay G CLA 2004-07-16 16:54:19 EDT
I'm having this problem all the time in 3.0. It seems to happen most often if I
select an entire line of text (home, home, shift-end) and then copy or cut. All
the edit actions are visibly enabled in the Edit menu. All ways of calling them
seem to fail: accelerator, menu, context menu. There is nothing obvious that
triggers the problem. Sometimes cut will work, but then paste won't! This is
driving me nuts. The severity should be bumped up on this since data can
potentially be lost.
Comment 5 Herman Bovens CLA 2004-08-03 07:06:38 EDT
In release 3.0, I'm also having this problem all the time, and I can reproduce
it consistently by trying to copy the line

    System.out.println("");

If I change something in the line, e.g. inserting a space,

    Sys tem.out.println("");

I can copy it without problems.
Comment 6 Simon Turner CLA 2004-08-18 08:06:36 EDT
I think it's to do with the new "Smart" Insert Mode (ha ha). I had the problem
all the time, but not once I turned that off (Edit menu, or Ctrl - Shift - Insert).
Comment 7 Stephen McCants CLA 2004-09-21 13:03:20 EDT
I see this problem (or something very similar) under AIX as well.
Comment 8 Rune Schjellerup CLA 2005-05-13 07:07:56 EDT
Problem also occurs in Linux. 
I have adapted a habit of pressing CTRL+C some 3-4 times 
since that seems to make eclipse realize that it should copy what I have 
selected. 
Comment 9 Rune Schjellerup CLA 2005-05-26 20:16:40 EDT
I use Eclipse 3.0.1-r2 on gentoo linux (the -r2 part is gentoo specific). 
The problem occurs while coding in the Java perspective. 
 
I don't think really helps to press ctrl+c more times. 
 
I'm constantly anoyed by this problem. 
Copy pasting is something you do often. 
And when the wrong thing is pasted more often than the right, you kind of loose 
hope in that old trusty keycombo. 
I nearly made a rather serious mistake today when I pasted something. It almost 
looked like what I had meant to cut, but I had cut some other nearly identical 
text just before that.... 
 
Also I can't copy stuff from outside eclipse into eclipse. 
Rather anoying too. 
 
What can I do to help getting this bug fixed faster??? 
Comment 10 Jay G CLA 2005-05-26 20:23:13 EDT
It seems like paste is what's broken, not cut and copy. Sometimes when I paste
between two files I have this problem. I assumed it was just doing nothing at
the paste, but noticed that it actually updates my import section to include the
missing imports from what I'm pasting. So there is some awareness of what's on
the clipboard (it's being analyzed to determine the imports to add to the file
-- assuming the clipboard data is directly inspected to determing this), it just
doesn't insert the clipboard text into the second file. 
Comment 11 Rune Schjellerup CLA 2005-05-26 20:54:02 EDT
I played a bit with it too. 
It seems that sometimes the copied stuff actually can be transferred 
between eclipse and for instance KEdit. 
I will try to find a pattern for when it succeeds when I get some time in a 
couple of days. 
Comment 12 Stephen McCants CLA 2005-05-31 12:11:56 EDT
You might look at Bug 74240 and see if some of the comments and notes there help
resolve the problems y'all are seeing.  
Comment 13 Federico Sauter CLA 2005-11-03 10:10:28 EST
I have this problem with release 3.1.1 for Mac OS X. I have made following observations:

- when the copy/paste functionality is (for some reason) disabled the "Source" menu changes its name 
to "Document". The problem might go away and the menu might still preserve that name.
- when this problem arises it is not possible to search for preferences in Window->Preferences nor it 
will display different panes if you change the selection (it seems completely broken).
- After forcing garbage collection with MyEclipse (www.myeclipseide.com) the situation does not 
improve.
- If I attempt to copy and then attempt to paste in an external application it becomes clear that nothing 
has been copied.
- Sometimes it will go away by itself.
- The lack of copy/paste functionality may affect only certain opened files, i.e. a situation could arise 
when I have file foo.java and goo.java opened and the problem affects only foo.java. If I closed foo.java 
and reopened it the problem would still be present for foo.java but not for goo.java. I have not 
experimented closing and reonopening goo.java.
- Relaunching eclipse does not guarantee this bug to go away, sometimes it continues after restarting.

Please help the community by fixing this bug, since it is *impossible* to work without cut and paste. 
Thanks!
Comment 14 Federico Sauter CLA 2005-11-03 10:13:08 EST
Just another observation: sometimes this condition goes awy when saving the affected file.
It is always possible to paste text copied in another application.
Comment 15 Boris Bokowski CLA 2005-11-04 22:43:09 EST
I just found this bug in the Platform-Scripting-Inbox "black hole". The last two
comments refer to 3.1.1 on MacOS. Frederico, do you have any other plug-ins
installed? Do you still see this problem when using just the Eclipse SDK?
Comment 16 Federico Sauter CLA 2005-11-29 12:31:11 EST
I have the MyEclipse plugin insalled (www.myeclipseide.com) After reinstalling eclipse and the plugins the problem has only arised when using the MyEclipse HTML editor and not anymore with eclipse's Java editor (as it used to happen), thus being a MyEclipse problem rather than a platform problem.
Comment 17 Kim Horne CLA 2005-12-08 12:56:23 EST
Marking as invalid in response to the previous comment.