Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Shortcut key to restart server in Eclipse

So Ctrl/Cmd + F11 starts 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).

like image 904
Wes Nolte Avatar asked May 31 '10 12:05

Wes Nolte


3 Answers

The approach of Nirmal Patel can be extended to restart the server while using only the keyboard.

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.

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.

Example for AutoHotKey: Create a script like discribed in the Tutorial containing just

^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. :)

like image 106
newur Avatar answered Nov 11 '22 14:11

newur


While focused on the Servers view, you can press Ctrl + Alt + R to restart the server.

like image 32
Nirmal Patel Avatar answered Nov 11 '22 14:11

Nirmal Patel


Not that I know of.
The only feature related to that shortcut dates from WTP2.0 and its interaction with Debug session:

Debug Last Launched

Have you ever used Run on Server, hit a bug in your application, and then hit F11 to 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-F11 for debug) to rerun just the last html page or EJB.

like image 2
VonC Avatar answered Nov 11 '22 15:11

VonC