Reputation: 7590
I'm trying to work in Eclipse as much as possible without a mouse. I cannot find a key binding for starting and stopping servers quickly in Eclipse WTP (Web Tools Platform).
One way to start a server is to switch to the package explorer (Alt+Cmd+Q P), select the project (up/down arrows) and then the "debug on server"-key binding (Shift+Alt+D R on the Mac). But this requires way too many steps.
Upvotes: 11
Views: 8753
Reputation: 2013
echo 'kill $(pgrep -f tomcat)' > ~/some-path/kill-tomcat.sh
Window > Preferences >
last lau
External Tools (the play icon with a toolbox, near Debug and Coverage) > External Tools Configurations >
Now you just press F9 (or Ctrl F11) to start, F11 to debug and F10 to stop. F10 will run kill-tomcat.sh
as long as it's the most recently launched external tool.
Upvotes: 0
Reputation: 21
If u look in Help > Key assist (Ctrl+shift+L), You can see a shortcut named Tomcat start,stop. The shortcut is Ctrl+Alt+T by default.
Upvotes: 0
Reputation: 3008
I found a method that reduces starting a server down to two keystrokes (after some easy initial setup).
the tl;dr: f11, enter.
you will likely need to do some setup to get this working:
Be sure you have a run/debug configuration defined for tomcat.
save all that, go back to a file in your project and press f11 (First required keystroke).
a dialog will pop up, the top choice being "Run on Server". Press enter (this is the 2nd required keystroke)
If this is your first time, you'll see another dialog after this which asks you to choose a server. Choose the server you want to run it on (you probably only have one), and check "always use this server when running this project" and you'll bypass this window in the future.
tip: you'll quickly notice that as a bonus, it will open up a web browser pointed at your server. you can change which browser it uses in windows->preferences->general->web browser.
and then there you have it. two keystrokes to start your server - f11, enter.
stopping it is another story. i haven't found a good way other than clicking the stop icon in severs or console. if you do, let me know...
Upvotes: 4
Reputation: 3419
While I don't perform the same steps as you to run my projects, I have created custom key-bindings to navigate around the eclipse environment. If you go to Eclipse Preferences > General > Keys
, you will be able to map the majority of tasks to key-bindings that make the most sense to you.
One process you could perhaps follow is this:
If you have 'Link with Editor' turned on, when you go to edit a file again your tree will expand based on the context of your work.
Upvotes: 1