1

当我尝试以编程方式更新特定的 Eclipse 插件时遇到了一些问题。

我已经上传了在github上重现问题所需的最少项目集。而且,我已经在 github 存储库的问题中详细描述了问题以及重现问题的步骤。

4

1 回答 1

2

使用UpdateOperation是更新指定包的最简单方法。

您可以通过查询您的配置文件来指定要更新的已安装 IU。

IProfile profile = ...;
UpdateOpertation updateOperation = new UpdateOperation(session, profile.query(QueryUtil.ALL_UNITS, null).toSet());

但显式更新所有 IU 并不是最佳实践。最好的方法是只更新根 IU(始终是产品 IU 或顶级功能)。

IProfile profile = ...;
UpdateOpertation updateOperation = new UpdateOperation(session, profile.query(QueryUtil.createIUQuery("theidofmyproductiu"), null).toSet());
于 2011-06-13T07:28:46.673 回答