How to enable AUTO_UPDATE in 3.5M6 [message #128950] |
Fri, 10 April 2009 03:21  |
Eclipse User |
|
|
|
I see something has changed on the Preferences side. In my RCP app I
have code like:
Preferences pref = ProvSDKUIActivator.getDefault()
.getPluginPreferences();
// See if automatic search is enabled at all
if (pref.getBoolean(PreferenceConstants.PREF_AUTO_UPDATE_ENABLE D) ==
false) {
pref.setValue(PreferenceConstants.PREF_AUTO_UPDATE_ENABLED, true);
}
pref.setValue(PreferenceConstants.PREF_UPDATE_ON_STARTUP, true);
pref.setValue(PreferenceConstants.PREF_DOWNLOAD_ONLY, true);
How would I do this with 3.5 ?
Regards Thomas
|
|
|
|
|
|
Re: How to enable AUTO_UPDATE in 3.5M6 [message #129945 is a reply to message #129265] |
Mon, 27 April 2009 13:52  |
Eclipse User |
|
|
|
Thomas wrote:
> Hi Susan,
>
> can you clarify some questions (see below) ?
>
> Susan McCourt schrieb:
>> Thomas wrote:
>>> I see something has changed on the Preferences side. In my RCP app I
>>> have code like:
>>>
>>> Preferences pref = ProvSDKUIActivator.getDefault()
>>> .getPluginPreferences();
>>> // See if automatic search is enabled at all
>>> if
>>> (pref.getBoolean(PreferenceConstants.PREF_AUTO_UPDATE_ENABLE D) ==
>>> false) {
>>>
>>> pref.setValue(PreferenceConstants.PREF_AUTO_UPDATE_ENABLED, true);
>>>
>>> }
>>> pref.setValue(PreferenceConstants.PREF_UPDATE_ON_STARTUP, true);
>>> pref.setValue(PreferenceConstants.PREF_DOWNLOAD_ONLY, true);
>>>
>>> How would I do this with 3.5 ?
>>
>> The preferences for auto-update moved from the bundle
>> org.eclipse.equinox.p2.ui.sdk to org.eclipse.equinox.p2.ui.sdk.scheduler.
>>
>> In M6, you need to ensure your app uses the scheduler bundle, not
>> ProvSDKUIActivator, and use the constants and prefs from its activator.
>>
> What exactly do I have to change here ?
Preferences pref =
AutomaticUpdatePlugin().getDefault().getPreferenceStore();
Get the prefs from AutomaticUpdatePlugin() instead of ProvSDKUIActivator.
Then use the PreferenceConstants defined in that bundle
(org.eclipse.equinox.p2.ui.sdk.scheduler) instead of PreferenceConstants
in the other bundle.
|
|
|
Powered by
FUDForum. Page generated in 0.04634 seconds