[英]adding buttons with shortcuts, or shortcuts only for ant tasks in Eclipse
I am working on a project which has an Ant script for all lifecycle phases. 我正在一个项目中执行所有生命周期阶段的Ant脚本。 The project, divided in small projects, is meant to be developed with Eclipse.
该项目分为小项目,旨在使用Eclipse开发。 The common version is the Indigo One.
通用版本是Indigo One。
Basically I am interested on putting a series of buttons with a shortcut each, or at least a shortcut only, to execute some of the main tasks. 基本上,我感兴趣的是放置一系列按钮,每个按钮都有一个快捷方式,或者至少只有一个快捷方式,以执行一些主要任务。 The relevant tasks are:
相关任务是:
thanks 谢谢
You can add a couple of "ant build" launch configurations to run your ant script(s) with specified ant targets and configuration. 您可以添加几个“ ant build”启动配置,以使用指定的ant目标和配置运行您的ant脚本。
Run>External Tool...>External Tools Configurations... and then select "ant build" and press "New launch configuration". 运行>外部工具...>外部工具配置...,然后选择“ ant build”并按“新启动配置”。 On "Main" tab specify buildfile and directory on "Target" select targets you want to run on "Properties" add additional properties or specify property file.
在“主要”选项卡上的“目标”上指定构建文件和目录,选择要在“属性”上运行的目标,添加其他属性或指定属性文件。
It would be also a good idea to give each of launch configurations a descriptive name. 给每个启动配置一个描述性名称也是一个好主意。
Later you can add your defined configuration to favorites for convenience and use them from External Tools (down arrow) on the toolbar (See: Run>External Tool...>Organize Favorites...) 稍后,您可以将定义的配置添加到收藏夹中以方便使用,并从工具栏上的“外部工具”(向下箭头)中使用它们(请参阅:“运行”>“外部工具...”>“组织收藏夹...”)
You can use the Ant view, which is integrated into Eclipse. 您可以使用集成到Eclipse中的Ant视图。 Press Ctrl+3 (cmd+3 on mac I think) and type Ant, and then open the view.
按Ctrl + 3(我认为在Mac上为cmd + 3)并键入Ant,然后打开视图。 Click on "Add buildfile" and add the relevant build file.
单击“添加构建文件”并添加相关的构建文件。 It'll then have the ant tasks listed in the view which you can just run from there.
然后它将在视图中列出蚂蚁任务,您可以从那里开始运行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.