Eclipse 终止键盘快捷键

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17803365/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 20:56:38  来源:igfitidea点击:

Eclipse Terminate Keyboard Shortcut

javaeclipsekeyboard-shortcuts

提问by William Grimes

How do I get eclipse to terminate? I use the keyboard shortcut Ctrl+F11to run a program and I cannot enable the terminate hotkey, since in development I run the program 100s of times per day I waste a lot of time clicking the red terminate square.

我如何让日食终止?我使用键盘快捷键Ctrl+F11运行程序,但无法启用终止热键,因为在开发中我每天运行程序 100 次,我浪费了很多时间点击红色终止方块。

I have looked at previous postings of this question and have gone to Windows --> Preferences --> General --> Keysand found "Terminate"command: I have set it to binding Shift+Ctrl+F11and set the "When"setting to "In Windows". I have tried various other options but the shortcut never works. Why?

我已经看过这个问题以前的贴子,并已去窗口- >首选项- >常规- >键,发现“终止”命令:我已经将它设置为绑定Shift+ Ctrl+ F11,并设置“当”设置“在 Windows 中”。我尝试了各种其他选项,但快捷方式从未奏效。为什么?

回答by ADTC

Addendum:Unfortunately there is no keyboard shortcut for the Terminate/Disconnect Alloption mentioned below and you cannot manually set one. But at the very least, you should be able to terminate all launches with just one mouse clickwith the instructions below. I would consider this a solution to a significant part of your problem, which is wasting a lot of time clicking the red Terminatesquare.

附录:不幸的是,下面提到的“终止/断开所有连接”选项没有键盘快捷键,您无法手动设置。但至少,您应该能够按照以下说明通过单击鼠标来终止所有启动。我认为这是您问题的一个重要部分的解决方案,这会浪费大量时间点击红色的“终止”方块。

To terminate all launches:

终止所有启动:

First Time Setup:

首次设置:

  • In the menus, click Window > Show View > Other...
  • Type debugin the search box and select Debug > Debug
  • Click OK. The Debugpane will open.
  • 在菜单中,单击窗口 > 显示视图 > 其他...
  • 在搜索框中键入debug并选择Debug > Debug
  • 单击确定。在调试窗格将打开。

Following which, how to terminate all launches:

接下来,如何终止所有启动:

  • Open or switch to the Debugpane.
  • Right-click on any of the items in the pane to get the context menu.
  • Click Terminate/Disconnect All.
  • 打开或切换到调试窗格。
  • 右键单击窗格中的任何项目以获取上下文菜单。
  • 单击全部终止/断开连接

Tips:

提示:

  • If the Consolepane is annoying you by opening automatically, either separate the Debugpane from the Consolepane (so they don't share the same section) or disable these two buttons in Consolepane's toolbar:
    • Show Console When Standard Out Changes
    • Show Console When Standard Error Changes
  • Some of the items in the Debugpane may not enable the option to terminate all. In this case, try right-clicking other items that look different.
  • 如果控制台窗格因自动打开而让您烦恼,请将调试窗格与控制台窗格分开(这样它们不会共享同一部分)或禁用控制台窗格工具栏中的这两个按钮:
    • 标准输出更改时显示控制台
    • 标准错误更改时显示控制台
  • 调试”窗格中的某些项目可能无法启用终止所有项目的选项。在这种情况下,请尝试右键单击看起来不同的其他项目。

Thanks to this SO Q&A, but it wasn't fully clear: Eclipse : How to terminate all applications at once?

感谢这个 SO Q&A,但它并不完全清楚:Eclipse:如何一次终止所有应用程序?

回答by Malcolm Boekhoff

Since CTRL+ F2does not work unless you have:

因为CTRL+F2不起作用,除非你有:

  • previously activated the debug view and
  • selected the process that you want to terminate
  • 之前激活了调试视图和
  • 选择了要终止的进程

The best that I can come up with is to use the "Keys" preferences to assign CTRL+ SHIFT+ F2to "Show View Debug", then you can type the following:

最好我能想出是使用“钥匙”优先选择指派CTRL+ SHIFT+ F2“显示查看调试”,那么你可以键入以下内容:

CTRL+ SHIFT+ F2(activates the debug view) DOWN (move cursor down onto the first process) CTRL+ F2(Terminate) F12(activate editing window)

CTRL+ SHIFT+ F2(激活调试视图)DOWN(将光标向下移动到第一个进程上) CTRL+ F2(终止) F12(激活编辑窗口)

回答by Chetan Potdar

You can basically use Ctrl+F2to terminate Eclipse.

您基本上可以使用Ctrl+F2来终止 Eclipse。

回答by Tanu Garg

Use Ctrl+F2to terminate the current running server, not eclipse. There is no shortcut key to terminate eclipse.

使用Ctrl+F2终止当前正在运行的服务器,而不是 eclipse。没有终止eclipse的快捷键。

Try here:

在这里试试:

http://www.developersbook.com/eclipse/eclipse-keyboard-shortcuts-2.php

http://www.developersbook.com/eclipse/eclipse-keyboard-shortcuts-2.php

http://eclipse-tools.sourceforge.net/Keyboard_shortcuts_%283.0%29.pdf

http://eclipse-tools.sourceforge.net/Keyboard_shortcuts_%283.0%29.pdf

Yes you are right. In fact if you check Windows --> Preferences --> Keys --> Terminate, "Terminate and relaunch", it is showing for server, not eclipse.

你是对的。事实上,如果你检查Windows --> Preferences --> Keys --> Terminate, "Terminate and relaunch",它显示的是服务器,而不是 eclipse。

回答by Henry Frerichs

I think you are looking for this:

我想你正在寻找这个:

  1. Go to Properties -> General -> Keys
  2. Look for "Stop" in my case there are 3, use the one under Category "Launch Bar".
  3. Assign your hotkey and set "In Windows" under the "When" option and apply.
  1. 转到属性 -> 常规 -> 键
  2. 在我的情况下寻找“停止”有 3 个,使用类别“启动栏”下的一个。
  3. 分配您的热键并在“何时”选项下设置“在 Windows 中”并应用。

This terminates the running process, even if the hotkey is called "Stop", wich is somewhat confusing, since there is another hotkey called "Terminate".

这会终止正在运行的进程,即使热键被称为“停止”,这有点令人困惑,因为还有另一个热键称为“终止”。

Regards!

问候!

回答by Marco

I manage to make it work, binding terminate command to PAUSE key with "when" clause to "In window". It works if in debug, not in run. Hope it helps

我设法让它工作,将终止命令绑定到 PAUSE 键,将“when”子句绑定到“In window”。如果在调试中,它就可以工作,而不是在运行中。希望能帮助到你