Equinox P2 Automaticlly Update default on

本文讨论了如何在Eclipse中默认启用自动更新功能。作者尝试通过修改代码及配置文件实现这一目标,但遇到了早期启动插件的限制。文中还提到了使用特定配置项进行设置的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Does anyone know how to make "Automaticlly Updates" in preferences defaultly on? It's off by default. I searched the codes and found that the pref is managed by class "org.eclipse.equinox.internal.p2.ui.sdk.scheduler.AutomaticUpdatesPreferencePage", and the pref key was org.eclipse.equinox.internal.p2.ui.sdk.scheduler.PreferenceConstants.PREF_AUTO_UPDATE_ENABLED. I could use hard codes to make it true when the bundle is started.

However this plugin is early-startup, the codes must be under the IApplication.start(), sometimes this method isn't accessible when developing based on plugins. Does anyone know a better way to finish this, like modifying the eclipse style using "org.eclipse.ui/SHOW_TRADITIONAL_STYLE_TABS = true" in the "plugin_customization.ini" file?

 

看Equinox P2 wiki上的例子,用这几行就行了,可是没效果

# automatic update options are defined in org.eclipse.equinox.p2.sdk.scheduler.PreferenceConstants
org.eclipse.equinox.p2.ui.sdk.scheduler/autoUpdateInit=false

# check for updates on startup
org.eclipse.equinox.p2.ui.sdk.scheduler/enabled=true
org.eclipse.equinox.p2.ui.sdk.scheduler/schedule=on-startup

# remind the user every 4 hours
org.eclipse.equinox.p2.ui.sdk.scheduler/remindOnSchedule=true
# see AutomaticUpdatesPopup, values can be "30 minutes", "Hour", "4 Hours"
org.eclipse.equinox.p2.ui.sdk.scheduler/remindElapsedTime=4 Hours

# download updates before notifying the user
org.eclipse.equinox.p2.ui.sdk.scheduler/download=true

看 来凡跟P2想关的东西都不好弄,烦

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值