Custom command for Eclipse on current file

一笑奈何 提交于 2019-11-28 21:37:17

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.

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} ).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!