配置 Eclipse RCP 更新管理器
我完成了 Eclipse RCP 应用程序并想要配置更新管理器。我的产品是基于功能的,更新正在正常工作,但我想限制用户。即强制一个特殊的更新站点或仅显示分组等。
我尝试使用策略,但它不起作用:
public class EPolicy extends Policy {
public EPolicy() {
setRepositoriesVisible(false);
setGroupByCategory(false);
setShowLatestVersionsOnly(false);
setRestartPolicy(RESTART_POLICY_FORCE);
}
}
在激活器中注册:
public void start(BundleContext context) throws Exception {
super.start(context);
Policy policy = new EPolicy();
context.registerService(Policy.class.getName(), policy, null);
}
我错过了什么吗?
i finished my Eclipse RCP Application and wanted to configure the update manager. My Product is feature based and updates are working like they should, but i want to limit the user. i.e. force a special update site or display only grouped etc.
I tried using Policy but it does not work:
public class EPolicy extends Policy {
public EPolicy() {
setRepositoriesVisible(false);
setGroupByCategory(false);
setShowLatestVersionsOnly(false);
setRestartPolicy(RESTART_POLICY_FORCE);
}
}
registering in the Activator:
public void start(BundleContext context) throws Exception {
super.start(context);
Policy policy = new EPolicy();
context.registerService(Policy.class.getName(), policy, null);
}
am i missing something?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试将您的政策设置为更高的排名,
Try to set your policy with higher ranking,