Configure Intellij IDEA to run batch file

耗尽温柔 提交于 2019-11-27 13:28:17

问题


I'm using InteliJ IDEA (Community addition) and I found myself doing some file transfers to and from the project folder. After reapeating the task for a while I've created some batch scripts that transfering the files automaticly. Now, I'll be much more happy if I could run the scripts directly from the IDE - by pressing a button for example...

Question is: Can I add buttons to IntelliJ IDE - that will run a batch file? If it's possible I'll be happy to know how it can be done.

Thanks!


回答1:


You can use "External Tools" to invoke any program

Goto Settings->External Tools and create a tool which will open the following dialog choose the batch file for Program.

Then the tool will be available in the menu Tools

Ref:External Tools

Update:

If you want to link an 'External Tool' to a 'Button' in the toolbar check How to add buttons linked to your external tool in InteliJ IDEA




回答2:


Also if you install "Batch Scripts Support" plugin, you will get nice file context menu actions for running batch files directly from the project view.

NOTE 2019: The original authors abandoned the plugin, but there is a maintained fork for current versions of IntelliJ: https://github.com/SimonIT/idea-batch/releases



来源:https://stackoverflow.com/questions/25968099/configure-intellij-idea-to-run-batch-file

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