Monday, March 05, 2007

Copy / Cut is very flakey in Eclipse 3.2 on Linux (interferences with Klipper)

I was experiencing this problem since I upgraded eclipse to 3.2 under Linux (both Debian and Gentoo): when I select test and copy it or cut it, most of the time not all the selected test is not copied (or cut). With cut you can see that since some part of the selected text is not cut, but with copy you realize it only when you paste and you don't see all the text. See also this bug report.

Similar problems happen when you select a file in the file view and copy it or cut it (in order to move it to a different location): often you get a message box saying that there were problems accessing the clipboard; alternatively, you can get a null pointer exception during pasting the file.

The message saying that there were problems accessing the clipboard made me think that the problem could have been in the KDE panel applet Klipper, the cut and paste history applet. So I tried to remove it from the panel and everything in eclipse worked fine again!

5 comments:

Raph said...

As a workaround, instead of closing Klipper, you can just uncheck 'Prevent empty clipboard' in Klipper's settings.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=153809#c28

John said...

Wow, you just saved me many frustrating, not working copy and paste trials. I never realized that klipper was the problem. I read the bug report and it seem to be enough to just deactivate the "Prevent empty clipboard" option of klipper.

betto said...

I don't know whether this is fixed in the new kde though...

manmalikmachine said...

Hey this was really bugging me and colleagues would not believe that Cut and Paste was not working!

Very useful tip. I can live without Klipper but not Eclipse C&P

Thanks

Anonymous said...

The fix for me was to turn OFF the klipper setting "prevent empty clipboard".
Happy developing