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

后端 未结 3 1957
小鲜肉
小鲜肉 2020-12-15 10:12

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 re

相关标签:
3条回答
  • 2020-12-15 10:53

    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
    
    0 讨论(0)
  • 2020-12-15 10:57

    You can do the following (for #2 and #3), after having those run configurations created:

    Go to Run > Run Configuration > Select the run configuration you want > Common > Display in Favorites Menu > Check Run/Debug. This will make it always appear as the first on the menu.

    This will make it appear in the menu in Run > History and Run > Debug History, then, you can access it through Alt+R, T, 1 (and 2 and 3) to run your configurations or Alt+R, H, 1 (and 2 and 3) to debug.

    And for #1, as Piotr Dobrogost said, you can just use Ctrl+F9 in the current editor and choose which test-cases you want to run (if you select a unit-test -- usually with Ctrl+Shift+Up or Ctrl+Shift+Down -- it'll be pre-selected for you) -- then, if you configured to always relaunch the last launch, as explained in http://www.pydev.org/manual_101_run.html, you can use Ctrl+F11 to relaunch the last launch.

    0 讨论(0)
  • 2020-12-15 11:09

    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

    0 讨论(0)
提交回复
热议问题