Equinox P2 Automaticlly Update default on

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想关的东西都不好弄,烦

你可能感兴趣的:(eclipse,UI)