Eclipse当前文件的自定义命令 [英] Custom command for Eclipse on current file
问题描述
我希望增强Eclipse,这样当我按下一个自定义键组合 - 说 Ctrl + Shift + E - 然后它将在当前文件上运行命令(如果我当前的缓冲区是foo.c,那么它将在foo.c的目录中运行`mycommand foo.c')。
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 file (if my current buffer is foo.c then it will run `mycommand foo.c' in foo.c's directory).
推荐答案
从运行菜单打开外部工具配置对话框。使用以下设置创建新配置。
Open the External Tools Configuration dialog from the Run menu. Create a new configuration with the following settings.
位置:c:\mycommand.exe(根据您的需要而定)
Location: c:\mycommand.exe (alter to your needs)
工作目录:$ {container_loc}
Working directory: ${container_loc}
参数:$ {resource_loc}
Arguments: ${resource_loc}
在Prefrences-> General-> Keys下,您可以设置Run last launch external tool的快捷方式。
Under Prefrences->General->Keys you can setup a shortcut for "Run last launched external tool".
这应该可以解决你的问题。
This should solve your problem.
这篇关于Eclipse当前文件的自定义命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!