Custom command for Eclipse on current file

后端 未结 2 1893
滥情空心
滥情空心 2020-12-14 11:37

I would like to enhance Eclipse so that when I press a custom key combo--say Ctrl + Shift + E--then it will run a command on the current fil

相关标签:
2条回答
  • 2020-12-14 11:52

    Also, make sure that your "resource" (foo.c) is selected. It happened to me that when testing the external tool and horizontally scrolling the output pane, the resource gets deselected. When you run the external tool again after probably having made changes to its configuration, Eclipse will pop up an error box about "empty variable" (e.g. ${resource_loc} ).

    0 讨论(0)
  • 2020-12-14 11:57

    Open the External Tools Configuration dialog from the Run menu. Create a new configuration with the following settings.

    Location: c:\mycommand.exe (alter to your needs)

    Working directory: ${container_loc}

    Arguments: ${resource_loc}

    Under Prefrences->General->Keys you can setup a shortcut for "Run last launched external tool".

    This should solve your problem.

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