Eclipse hang when copying / pasting code

EclipseEclipse PluginEclipse 3.4

Eclipse Problem Overview


I have a big problem. Eclipse is hanging up when I do any copy/paste with Ctrl+C / Ctrl+V keys.

Is it due to the Eclipse validation code system?

Do I mess something in my Eclipse setting?

Here is my conf :

  • Eclipse 3.4.2
  • Plugin RSE
  • Windows XP pro Service Pack 2
  • Java VM version = 1.5.0_11-b03

Eclipse Solutions


Solution 1 - Eclipse

Disabling Hyperlinking fixed this for me. You could also just change the Default modifier key to something other than CTRL if you still want to use hyperlinking.

Go to Window -> Preferences -> General -> Editors -> Text Editors -> Hyperlinking and either uncheck Enable on demand hyperlink style navigation or change Default modifier key.

Solution 2 - Eclipse

I had the same issue, and was able to solve it by going to: Preferences -> Javascript -> Editor -> Typing -> "When pasting" heading ... then turning "Update imports" off.

That one change on its own completely eliminated it, when I was previously getting hangs of 2 seconds or more on almost every copy or paste.

Solution 3 - Eclipse

I solved this issue with these steps:

  1. Identify which "editor" is causing the problem. I detected that, in my case, the java script editor was the one causing it, but when copy/pasting in a simple text editor, (no high light, no color , no nothing) there was no such problem.

Note:Eclipse loads the file in different "editor windows/ plugins" depending on the file extension, this is configured in General > Editors > File Associations

  1. As my case was caused by the JavaScript editor, went to Preferences > Java Script > Editor > Typing, and disabled all the "Automatically" boxes. This made the trick.

Solution 4 - Eclipse

THE solution!! For me at least.

If CTRL + C works for some editor, not for other, then some plugin settings must have re-affected them to another command.

So you have to go to:

 Window->Preferences->General->Startup and Shutdown

and try to disable, one by one the plugins activated on startup:
in my case, was "Dynamic Languages Toolkit Core UI"

Solution 5 - Eclipse

I solved unchecking all bound to CTRL + C except Copy in Window -> Preferences -> General -> Keys

Solution 6 - Eclipse

I think I have found a beginning of a solution here.

Starting Eclipse with -clean option seems to be better but this not enough. this is because my "workspace building is hanging up on some flash file"

Solution 7 - Eclipse

I faced the problem when editing java code. Every time I typed CTRL + C the editor freezes for a short period of time.

In my case I only turned of the Go to declaration that is available in textual editors. SeeWindow -> Preferences -> General -> Editors -> Text Editors -> Hyperlinking.

Solution 8 - Eclipse

Just wanted to share my observations here as a pebble in the ocean, I had tried with all most all of the above options but it didn't solve my issues.

Actually, in my case the main culprit was the java file size, as lines of code increased encountering this hanging while copy & paste actions.

So quick workaround which I made to have a temp file for development and once all done, moving the code to respective java file, get me out of this hurdle. (I am a selenium + Java guy, so this workaround worked for me).

Solution 9 - Eclipse

In my case it seemed to be related to remote connection to the PC (working directly on the PC was not freezing it, while working remotely via Remmina it was). My fix was to unbind ALL commands on Ctrl+C (Window > Prefs > General > Keys), including the basic Copy (!!!). The operating system (or Eclipse core functionality) seems to handle clipboard keys correctly by default, no need to bind the additional "Copy" command to it. Now it's not freezing anymore, enjoy!

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionPierre-Gilles LevalloisView Question on Stackoverflow
Solution 1 - EclipsetheblangView Answer on Stackoverflow
Solution 2 - EclipseAndrew FaulknerView Answer on Stackoverflow
Solution 3 - EclipseDevNull.arView Answer on Stackoverflow
Solution 4 - EclipseLuca DavanzoView Answer on Stackoverflow
Solution 5 - EclipseAlessandro PezzatoView Answer on Stackoverflow
Solution 6 - EclipsePierre-Gilles LevalloisView Answer on Stackoverflow
Solution 7 - EclipseRené LinkView Answer on Stackoverflow
Solution 8 - EclipseKrisView Answer on Stackoverflow
Solution 9 - EclipsepingpongView Answer on Stackoverflow