指定和崇高的文本2 ant目标之间切换 [英] Specify and switch between ant targets in sublime text 2
问题描述
使用文本崇高2 I'm连同蚂蚁构建系统。 CTRL + B工作完全正常使用默认的目标启动构建。但是我的问题是,有没有定义不同的Ant构建目标,并有一个机制很容易它们之间切换的方式?
I´m using Sublime Text 2 together with the ant build system. CTRL+B works perfectly fine to start the build with the default target. However my question is, is there a ways to define different ant build targets and have a mechanism to switch between them easily?
我想过创造更多的自定义生成每个目标的命令 - 例如像干净。它的工作原理,而是因为你必须去工具>生成系统>蚂蚁(清洁),按CTRL + B之后,是不是在我眼里最好的办法。
I thought about creating additional custom build commands for each target - for example like "clean". It works, but that is not the best approach in my eyes because you have to go to "Tools > Build System > Ant (clean)" and hit CTRL+B afterwards.
推荐答案
保存此构建文件作为软件包/用户文件夹* .sublime-build文件
Save this build file as *.sublime-build file in the Packages/User folder
{
"selector": "source.java",
"cmd": ["ant"],
"variants": [
{ "cmd": ["solve_world_hunger"],
"name": "Solve World Hunger"
},
{ "cmd": ["ant", "clean"],
"name": "Run"
}
]
}
- 默认目标将建立在
CTRL + B
- 在
变种
阵列名为运行
将在CTRL +运行移CMD + b
- 的变种阵列中的CMD可以通过命令面板通过搜索
名称
运行。即按CTRL + SHIFT + P
键,键入解决世界饥饿
来运行解决世界饥饿命令。 - Default target will build on
ctrl+b
- The cmd named
Run
in thevariants
array will run onctrl+shift+b
- Any cmd in the variants array can be run via the command palette by searching for
name
. i.e. hitctrl+shift+p
and typeSolve World Hunger
to run the solve world hunger command.
这篇关于指定和崇高的文本2 ant目标之间切换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!