Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要能够在我的 Eclipse 插件中更改项目构建命令。我有一个 Eclipse 插件,只要激活它,我就需要更改当前项目的构建命令。我希望插件能够做到这一点,而不是用户必须手动更改它。
我自己解决了这个问题。如果您使用 ManagedBuildManager,它允许您修改构建命令。
这是示例代码:
IConfiguration config = ManagedBuildManager.getBuildInfo(activeProject).getDefaultConfiguration(); config.setBuildCommand("test"); ManagedBuildManager.saveBuildInfo(activeProject, true);