Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I bind a specific key to different launch configurations in Eclipse?

I have several launch configurations for the code I work on.

One configuration (#1) means "run the unit tests for the file in the frontmost editor (i.e. selected resource)". I would really like to be able to always make this be bound to a key.

Another configuration (#2) means "run the server that I am working on (in the frontmost project) so I can test it interactively".

Yet another (#3) means "run some automated acceptance tests against the server".

I always want to have #1 close at hand, easy to run from a single keystroke. Plus, I want to be able to run #2, watch it start up in a console, and when it's ready (since it's not entirely trivial to automate this) hit the key for #3.

This is possibly similar to the question for binding a key to a specific build configuration, but the answers there look very specific to builds, and as I'm using PyDev, I don't have a "build" step at all.

Also, given that I'm using PyDev, an answer in the form of a pyedit_* script would be appreciated just as much as a "native" answer for eclipse.

like image 769
Glyph Avatar asked Jun 26 '10 19:06

Glyph


2 Answers

Maybe Eclipse Runner plugin could make it easier for someone to handle launch configurations. It doesn't allow to assign key binding to launch configurations currently but I opened a feature request Key bindings for launch configurations

like image 114
Piotr Dobrogost Avatar answered Nov 03 '22 16:11

Piotr Dobrogost


Not to a specific launch Configuration , but you can bind a key to run Last run Configuration ,

Windows->preferences->General->Keys->Run last launched external Tool
like image 1
Raaghu Avatar answered Nov 03 '22 17:11

Raaghu