问题
I created a new eclipse project with a new run configuration. This configuration is visible on the drop down menu for run configurations and has a 1 on it. How do I assign a Key to run exacty this configuration?
The problem I have is, that I use eclipse to write scala, and the hotkey "Run as Scala" does only work if my editor has the file with the main class opened (WTF). On all other files I get the error message "Editor does not contain a main type" without any further information. So I created a run configuration, where I specified the Main file, but now I don't know how to start this configuration without touching the mouse.
回答1:
The hot key to run something is Ctrl-F11.
回答2:
works best Alt+R then T then 1.
回答3:
Refer to Shortcut for selecting run configuration in Eclipse IDE which said to use ALT+R, N, and then type a name, which shows Run Configurations for me.
Best option:
Assign (bind) a shortcut via Window > Preferences, General > Keys
The command to select is "Run..."
(I added this answer because for me the accepted one shows Run Menu, then T is for Terminate, nothing to do with Run Configs)
来源:https://stackoverflow.com/questions/13493308/how-do-i-map-a-key-in-eclipse-to-run-the-project-run-configuration