简体   繁体   English

Eclipse-创建自定义“运行”

[英]Eclipse - Creating custom “run”

i have got a question about the run menu of Eclipse. 我对Eclipse的运行菜单有疑问。

My problem: 我的问题:
I'm programming a plugin which can only be started when I type some commands in my command line (ei Preparing all files, creating a jar file, coping it in a specific path) and pressing a key in a program. 我正在编程一个插件,该插件只能在命令行中键入一些命令(例如,准备所有文件,创建一个jar文件,在特定路径中对其进行处理)并在程序中按某个键时才能启动。 I cannot run it as an normal java application. 我无法将其作为普通的Java应用程序运行。
So, I have written a python script which does it for me. 所以,我写了一个Python脚本来帮我。 (I chose python as a script language because it is cross-plattform. I could do it in java but the JVM needs too much time to start). (我选择python作为脚本语言是因为它是跨平台的。我可以用java来做,但是JVM需要太多的时间来启动)。
That way (switching to the command-line, pressing the arrow key, pressing enter) needs too much time, however. 这样,(切换到命令行,按箭头键,按Enter)需要太多时间。 It would like to press only the run button in eclipse as I am used to with other Java Application. 就像我在其他Java应用程序中一样,它只想按Eclipse中的run按钮。

What I also want to have: 我还想拥有:
I want only to press the run button in eclipse to start that python script. 我只想按Eclipse中的运行按钮来启动该python脚本。 The output of the console should be the output of the python script. 控制台的输出应为python脚本的输出。 The run should be terminated as soon as the python script ends running. python脚本结束运行后,应立即终止运行。

I am not going to programme a "Eclipse Plugin", which does it. 我不会编写“ Eclipse插件”,而是这样做。 I only want a way which needs at most 5 minutes to configure my "Run Script". 我只想要一种最多需要5分钟即可配置“运行脚本”的方法。

面板截图 Find this little icon on your panel. 在面板上找到这个小图标。 There you can add and configure any external scripts to run 您可以在此处添加和配置要运行的任何外部脚本

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM