Bug 19390

Summary: unable to change org.eclipse.update.ui.historySize preference via plugin_customization.ini
Product: [Eclipse Project] Platform Reporter: Jim des Rivieres <jeem>
Component: Update (deprecated - use Eclipse>Equinox>p2)Assignee: Konrad Kolosowski <konradk>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 2.0 F3   
Hardware: PC   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 19301    

Description Jim des Rivieres CLA 2002-06-05 14:35:15 EDT
F2 build

0. Brand new install; brand new workspace
1. Add the following line to the file
<install>/eclipse/plugins/org.eclipse.platform_2.0.0/plugin_customization.ini

org.eclipse.update.ui/org.eclipse.update.ui.historySize=20

2. Start eclipse
3. Open the preferences page

Observe: the maximum number of history configurations is 5.

Expectation: it should be 20.

4. Hit Restore Defaults

Observe: the maximum number of history configurations is still 5.

Expectation: it should be 20.
Comment 1 Jim des Rivieres CLA 2002-06-05 19:19:19 EDT
The problem is in the way the update UI handles the defaulting of
preference values.

Currently, MainPreferencePage.initializeDefaults(IPreferenceStore store)
is being called (4 places) from within MainPreferencePage; this sets
(or resets) the default values each time it is called.

The recommended way to establish default preferences is by overriding
Plugin.initializeDefaultPluginPreferences() in UpdateUIPlugin.
This ensures that default overrides can be furnished either by the primary
feature (plugin_customization.ini) or via the command line (-
plugincustomization parameter). The method will be called automatically
(and extactly once) when the plug-in's preference store is first requested.
Comment 2 Vlad Klicnik CLA 2002-06-08 12:25:09 EDT
applied patch supplied by Konrad.
released into HEAD.

[note: there still seems to be a problem in update.core actually not honoring 
the setting, histories seem to be trimmed to 5 even if the setting is >5]

Marking this defect as fixed, keeping bug 19301 open.