在 Eclipse 中重启服务器的快捷键
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2943355/
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
Shortcut key to restart server in Eclipse
提问by Wes Nolte
So Ctrl/Cmd+ F11starts the server, but is there a key to restart the server? I'm developing using app engine and GWT if that makes any difference (I suspect not).
所以Ctrl/ Cmd+F11启动服务器,但是有没有重启服务器的键?我正在使用应用程序引擎和 GWT 进行开发,如果这有什么不同的话(我怀疑不会)。
采纳答案by VonC
Not that I know of.
The only feature related to that shortcut dates from WTP2.0and its interaction with Debug session:
从来没听说过。
与该快捷方式相关的唯一功能来自 WTP2.0及其与调试会话的交互:
Debug Last Launched
调试上次启动
Have you ever used
Run on Server
, hit a bug in your application, and then hit F11to test again, only to find out that it tries to start the server again instead?
This long standing and annoying bug has been fixed, so you can now use F11(or Ctrl-F11for debug) to rerun just the last html page or EJB.
您是否曾经使用过
Run on Server
,遇到应用程序中的错误,然后F11再次进行测试,却发现它试图再次启动服务器?
这个长期存在且令人讨厌的错误已得到修复,因此您现在可以使用F11(或Ctrl-F11用于调试)仅重新运行最后一个 html 页面或 EJB。
回答by newur
The approach of Nirmal Patel can be extended to restart the server while using only the keyboard.
Nirmal Patel 的方法可以扩展为仅使用键盘重新启动服务器。
Therefore define a shortcut to switch from the editor (or wherever you want) to the Servers View. Go to Window -> Preferences -> General -> Keys. Select 'Show Views (Servers)', choose for the 'When' attribute: 'In Windows' and use your prefered shortcut in the binding input field, for example Ctrl+ Alt+ R.
因此,定义一个从编辑器(或您想要的任何地方)切换到服务器视图的快捷方式。转到窗口 -> 首选项 -> 常规 -> 键。选择“显示视图(服务器)”,选择“何时”属性:“在 Windows 中”并在绑定输入字段中使用您喜欢的快捷方式,例如Ctrl+ Alt+ R。
Hitting this shortcut twice now will restart the server. (First one will bring you to the Servers View, second is the default to restart the server while in Servers View.) With a macro program like AutoHotKey you can bring it down to one simple shortcut.
现在点击此快捷方式两次将重新启动服务器。(第一个将带您进入服务器视图,第二个是在服务器视图中重新启动服务器的默认设置。)使用像 AutoHotKey 这样的宏程序,您可以将其简化为一个简单的快捷方式。
Example for AutoHotKey: Create a script like discribed in the Tutorialcontaining just
AutoHotKey 示例:创建一个脚本,如教程中所述,仅包含
^r::
Send ^!r^!r
^r::
Send ^!r^!r
Run the script (Rightclick on it -> Run Script) and if you defined the shortcut like mentioned above, you can now restart the server with a simple Ctrl+ R. Pretty convenient. :)
运行脚本(右键单击它 -> 运行脚本),如果你定义了上面提到的快捷方式,你现在可以用一个简单的Ctrl+重新启动服务器R。挺方便的。:)
回答by Nirmal Patel
While focused on the Servers view, you can press Ctrl+ Alt+ Rto restart the server.
在专注于服务器视图时,您可以按Ctrl+ Alt+R重新启动服务器。
回答by Abdullah Khan
For MAC
users
对于MAC
用户
Start the server - OPTION+COMMAND+R
启动服务器—— OPTION+COMMAND+R
Start the server in DEBUG mode - OPTION+COMMAND+D
以 DEBUG 模式启动服务器 - OPTION+COMMAND+D
Stop the server - OPTION+COMMAND+S
停止服务器 - OPTION+COMMAND+S