35

I recently updated my Eclipse to the latest release 3.5 and since then I have a very annoying problem with c&p using the shortcuts.

In an editor (xml, jsp, doesn't matter which one) I try to copy something and paste it somewhere else, nothing happens. When I cut out something and put it somewhere else I sometimes get something else (like a messed up part of my previous selection) or just some whitespaces. This gets even worse when I change lines in between.

First I thought that my keyboard is probably broken but it works just fine in other programs. Then I tried using the context menus' c&p and there it works. Yesterday I managed to get at least an error message when I tried to copy a file in the navigator from one project to another (the message was just "error using copy...bla". no details).

Does anyone else have this problem, or know how to solve it?

I am running on Kubuntu 9.04, and have quite some plugins installed (but only from the Galileo Updates Site), like Birt, Mylin, WST, or Subversive.

Null
  • 1,950
  • 9
  • 30
  • 33
lostiniceland
  • 3,729
  • 6
  • 38
  • 50

9 Answers9

57

For my problem, I had to go to Window > Preferences > Java > Editor > Typing, and uncheck "Update imports"

Jeff Axelrod
  • 27,676
  • 31
  • 147
  • 246
  • Thanks. I was facing the same issue in Eclipse Kepler and this worked for me. – Jayamohan Jul 16 '13 at 01:00
  • Helped with a similar problem, when CTRL+X deletes the original text but does not copy it to clipboard. Moreover, when I later checked the option "Update imports" back, the problem did not return. So it seems to be a misconfiguration, healed by checking and unchecking this option. – Alexander Sorkin Jul 17 '19 at 11:20
9

This must be related to the key mapping, since those shortcuts are defined according to context.
(Column "When", in Preferences / General / Keys)

Keys

Check if those shortcuts do not work for any editor (do they work for Java editor?)

If they work for some editor, not for other, then some plugin settings must have re-affected them to another command.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks for the answer. I setup another eclipse installation with just the most important plugins and it works better...but not quite yet ;) It works when I have an editor open and move lines from one to the other. But when I close the source-editor and try to paste then I get something older from the clipboard! Pretty weird, I never had anything like this before. – lostiniceland Jul 27 '09 at 20:57
  • Thanks for the answer! It was quite frustrating with the C&P issue as it sometimes work sometime it doesn't. Since you've pointed me to the shortcut Keys configuration I've removed the copy and paste shortcut there as the windows shortcut should work with out Eclipse checking for it. And presto it works so far! –  Dec 03 '09 at 15:24
  • Wow, Mr. VonC, you are my hero:-)! It took me few days of swearing and reinstalling of Eclipse to figure out, with your priceless help, what to do. – Whitewall May 16 '12 at 13:39
  • @Whitewall glad to have been of assistance. – VonC May 16 '12 at 13:58
  • for me I only had problems with bindings in XML files (I amusing Eclipse Juno), but key shortcuts were working as espected in Java class files. My problem was worse though: delete, undo (ctrl-z), and backspace (delete) didn't work either. Fixed by deleting all bindings as per this answer. Thanks man! – slinden77 Jun 30 '12 at 05:19
3

This is caused by various X clipboard managers doing weird things with the clipboard. (bug report).

In XFCE the clipman applet was rolled in XFCE 4.8, and will be the source of these problems.

To fix this in XFCE - kill xfce4-settings-helper. You will need to use Settings Manager -> Session and Startup -> Session to kill it, as otherwise it may restart automatically.

To prevent this starting next time, you will need to remove it from your startup/login programs in Settings Manager > Session and Startup > Application Autostart.

Danny Staple
  • 7,101
  • 4
  • 43
  • 56
Kevin
  • 41
  • 2
  • I've been trying to kill this, but each time I kill it, it restarts immediately. The parent is always 1 (init) annoyingly, so I cannot see the tree. I am suspecting xfsettingsd to be the culprit though. – Danny Staple Nov 08 '11 at 10:01
  • Okay - killing that xfsettingsd seems to have removed some of the window decoration glitz - and the settings helper is still restarting. It wasn't that. – Danny Staple Nov 08 '11 at 10:03
  • Related - http://old.nabble.com/Problems-with-xfce-settings-helper--td32145311.html - this affects other programs if it is this. – Danny Staple Nov 08 '11 at 10:05
  • Got it - guaranteed way to kill (without it autorestarting) is to go to: Settings->Session And Startup -> Session, and then kill it there. It seems this session manager is restarting things, there was a restart "immediately" setting there. – Danny Staple Nov 08 '11 at 10:10
1

Problem was solved with newer Eclipse releases. I think >= 3.6. Depending on your distribution there may be a (back)port of this (not on my Xubuntu 11.04) within the repositories.

So a tarball installation of Eclipse 4.0 works perfectly for me. Cut&Paste works and I am lucky that my plugins are compatible to 4.0.

Unfortunately Sublime Text has the same problems.

Michael
  • 11
  • 1
0

Workaround:

You can cut&paste from the compare view. So simply compare the un-copyable file (e.g., local history) with a different version and Control-C what you need there.

Scott Evernden
  • 39,136
  • 15
  • 78
  • 84
0

In the *.java editor page, right click and select open in text editor. Past your snippet there. Your Snippet will show in the *.java page'

kukido
  • 10,431
  • 1
  • 45
  • 52
0

I use Eclipse Kepler for PHP development. It's dumb I know.

None of the solutions suggested here has solved this source of frustration. I can confirm the copy function works whether shortcut keys are bound or not. As I can copy from eclipse and paste into any other application. Except eclipse.

My solution. Accidental discovery: Eclipse Kepler will allow you to paste outside the php open and close tags and allow you to click and drag the highlighted block of content into into position.

Acceptable solution for small bits of code. Horribly crippling for larger development environments.

0

For Xming, this resolved the problem for me. In XLaunch uncheck Clipboard (clipboard manager) in the "Specify parameter settings" GUI form.

JayS
  • 2,057
  • 24
  • 16
0

I read somewhere that in KDE maybe Klipper / "Klipper on the panel" conflicts with eclipse copy action. It's a tool for clipboard history. Try to remove that! It may solve your problem :-/

For me the xfce4-settings-helper killing worked.

kisp
  • 6,402
  • 3
  • 21
  • 19