如何在 eclipse ant 编辑器中启用撤消?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/913059/
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
How do I enable undo in eclipse ant editor?
提问by Ludwig Weinzierl
Undo is not working for me in ant editor in eclipse. When I press Ctrl-Z nothing happens.
在 Eclipse 的 ant 编辑器中,撤消对我不起作用。当我按下 Ctrl-Z 时,什么也没有发生。
Is it possible to enable undo somehow or is this a bug?
是否可以以某种方式启用撤消或者这是一个错误?
I am using Eclipse 3.4.2 (Ganymede) on Windows XP Professional.
我在 Windows XP Professional 上使用 Eclipse 3.4.2 (Ganymede)。
回答by VonC
Yes undo should be working perfectly in an ant editor.
For Ctrl-Z
to not workcould mean:
是的,撤消应该在 ant 编辑器中完美运行。
因为Ctrl-Z
不工作可能意味着:
- the shortcut has been assigned to another action (
Windows > Preferences > General > Keys
) - the undo buffer size is somehow at '0' (
Windows > Preferences > General > Editors > Text Editor
) - a plugin somehow 'steals' the key event for itself
- 快捷方式已分配给另一个操作 (
Windows > Preferences > General > Keys
) - 撤消缓冲区大小不知何故处于“0”(
Windows > Preferences > General > Editors > Text Editor
) - 一个插件以某种方式“窃取”了自己的关键事件
Try a fresh install, and check also with a latest Galileo (3.5RC2) install to see if the problem persist.
尝试全新安装,并检查最新的 Galileo (3.5RC2) 安装,看看问题是否仍然存在。
Note: zvikicomentions the existence of a known bug with ant editor in 3.4.2
注意:zvikico在 3.4.2 中提到了 ant 编辑器中存在一个已知错误
After a quick search, the following bugs might explain your situation:
经过一个快速搜索,下面的错误可能说明您的情况:
- 267780[ant editor] delete line cannot be undone after cursor has been moved
- 247434Failed to undo removal of line in Ant editor, only with 'Eclipse IDE for Java Developers', with Eclipse Classic you don't get this behavior
- 267780[ant editor] 移动光标后无法撤消删除行
- 247434无法在 Ant 编辑器中撤消删除行,仅适用于“Java 开发人员的 Eclipse IDE”,使用 Eclipse Classic 则不会出现此行为
and finally:
最后:
- 239115Undo functionality does not work anymore in the ant editor, mainly because a WTP issue, only solved in 3.5
- 239115ant 编辑器中的撤消功能不再起作用,主要是因为 WTP 问题,仅在 3.5 中解决
回答by user3201569
If the CTRL-Z (undo) does not work anymore, you might try that. It worked for me: go to Preferences -> General -> Keys and click on apply button or restore defaults button
如果 CTRL-Z(撤消)不再起作用,您可以尝试这样做。它对我有用:转到首选项 -> 常规 -> 键,然后单击应用按钮或恢复默认值按钮
回答by CodeMed
I see this post is very old, but I am adding a response for the people who find this through the search engines.
我看到这篇文章很旧,但我正在为通过搜索引擎找到这篇文章的人添加一个回复。
Ctrl-Zstopped working in eclipse for me when I made a small change in one part of my code which in turn triggered an unexpected infinite loop in a different part of my code.
Ctrl-Z当我对我的代码的一部分进行小的更改时,我停止在 eclipse 中工作,这反过来又在我的代码的不同部分触发了意外的无限循环。
- I used the windows task manager to kill the application that I had been testing when Ctrl-Zhad stopped working, and then I used
system.out.println()
to identify the part of the code where the infinite loop was being triggered. - I then disabled that section of code, which in turn caused Ctrl-Zand everything else to start working again.
- I was able to finish debugging from there.
- 我使用 windows 任务管理器杀死了我一直在测试的应用程序Ctrl-Z停止工作,然后我用来
system.out.println()
识别触发无限循环的代码部分。 - 然后我禁用了该部分代码,这反过来导致Ctrl-Z以及其他所有内容重新开始工作。
- 我能够从那里完成调试。