复制/粘贴代码时 Eclipse 挂起
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1294135/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse hang when copying / pasting code
提问by Pierre-Gilles Levallois
I have a big problem. Eclipse is hanging up when I do any copy/paste with Ctrl+C/ Ctrl+Vkeys.
我有一个大问题。当我使用Ctrl+ C/ Ctrl+V键进行任何复制/粘贴时,Eclipse 挂断了。
Is it due to the Eclipse validation code system?
是因为 Eclipse 验证码系统吗?
Do I mess something in my Eclipse setting?
我的 Eclipse 设置有什么问题吗?
Here is my conf :
这是我的配置:
- Eclipse 3.4.2
- Plugin RSE
- Windows XP pro Service Pack 2
- Java VM version = 1.5.0_11-b03
- 日食 3.4.2
- 插件 RSE
- Windows XP 专业版服务包 2
- Java VM 版本 = 1.5.0_11-b03
回答by theblang
Disabling Hyperlinking
fixed this for me. You could also just change the Default modifier key
to something other than CTRLif you still want to use hyperlinking.
禁用Hyperlinking
为我解决了这个问题。您也可以将 更改Default modifier key
为其他内容,CTRL除非您仍然想使用超链接。
Go to Window-> Preferences-> General-> Editors-> Text Editors-> Hyperlinkingand either uncheck Enable on demand hyperlink style navigation
or change Default modifier key
.
转到Window-> Preferences-> General-> Editors-> Text Editors-> Hyperlinking并取消选中Enable on demand hyperlink style navigation
或更改Default modifier key
.
回答by Andrew Faulkner
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.
我遇到了同样的问题,并且能够通过以下方式解决它:首选项 -> Javascript -> 编辑器 -> 键入 -> “粘贴时”标题......然后关闭“更新导入”。
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.
那个改变本身就完全消除了它,以前我几乎每次复制或粘贴都会挂起 2 秒或更长时间。
回答by DevNull.ar
I solved this issue with these steps:
我通过以下步骤解决了这个问题:
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
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.
确定导致问题的“编辑器”。我检测到,在我的情况下,java 脚本编辑器是导致它的原因,但是在简单的文本编辑器中复制/粘贴时,(没有高光,没有颜色,没有任何东西)没有这样的问题。
注意:Eclipse 根据文件扩展名在不同的“编辑器窗口/插件”中加载文件,这是在 General > Editors > File Associations 中配置的
由于我的情况是由 JavaScript 编辑器引起的,转到Preferences > Java Script > Editor > Typing,并禁用所有“自动”框。这使伎俩。
回答by Luca Davanzo
THEsolution!! For me at least.
的解决方案!至少对我来说。
If CTRL+ Cworks for some editor, not for other, then some plugin settings must have re-affected them to another command.
如果CTRL+C适用于某些编辑器,而不适用于其他编辑器,则某些插件设置必须将它们重新影响到另一个命令。
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"
并尝试一个一个禁用启动时激活的插件:
在我的情况下,是“Dynamic Languages Toolkit Core UI”
回答by Alessandro Pezzato
I solved unchecking all bound to CTRL+ Cexcept Copyin Window -> Preferences -> General -> Keys
我解决了所有取消选中必然CTRL+C除了复制的Window -> Preferences -> General -> Keys
回答by Pierre-Gilles Levallois
回答by Kris
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.
实际上,在我的情况下,罪魁祸首是 java 文件的大小,因为在复制和粘贴操作时遇到这种挂起的代码行会增加。
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).
如此快速的解决方法,我有一个用于开发的临时文件,一旦完成,将代码移动到相应的 java 文件,让我摆脱这个障碍。(我是一个 selenium + Java 人,所以这个解决方法对我有用)。
回答by René Link
I faced the problem when editing java code. Every time I typed CTRL + C
the editor freezes for a short period of time.
我在编辑 java 代码时遇到了这个问题。每次我输入时CTRL + C
,编辑器都会冻结一小段时间。
In my case I only turned of the Go to declaration
that is available in textual editors. SeeWindow -> Preferences -> General -> Editors -> Text Editors -> Hyperlinking
.
就我而言,我只关闭了Go to declaration
文本编辑器中可用的 。见Window -> Preferences -> General -> Editors -> Text Editors -> Hyperlinking
。