Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 317642

Summary: [Help] Restore defaults button does not read remoteHelpPreferred preference correctly. - Fix in Eclipse 3.7
Product: [Eclipse Project] Platform Reporter: Chris Goldthorpe <cgold>
Component: User AssistanceAssignee: Chris Goldthorpe <cgold>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: cgold, ChrisAustin, perryja, xingzhenchang
Version: 3.7   
Target Milestone: 3.7 M1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Chris Goldthorpe CLA 2010-06-22 17:40:39 EDT
+++ This bug was initially created as a clone of Bug #316011 +++

Build Identifier: eclipse-SDK-I20100603-1500-win32

When clicking the Restore Defaults button, Eclipse reads the default preferences for remote help, and loads them in.  However, when reading the value for the remote help preferred setting, when setting the correct values for the "Include remote help but give local help priority" and "Include remote help but give local help priority", the preference is not negated properly for the local help priority setting.  

searchLocalHelpFirst.setSelection(new DefaultPreferenceFileHandler().isRemoteHelpPreferred());
searchLocalHelpLast.setSelection(new DefaultPreferenceFileHandler().isRemoteHelpPreferred());

The searchLocalHelpFirst should negate the isRemoteHelpPreferred() value:

searchLocalHelpFirst.setSelection(!(new DefaultPreferenceFileHandler().isRemoteHelpPreferred()));

The bad behavior is that if remote help preferred is the default, both boxes will have that value which is incorrect.

Reproducible: Always

Steps to Reproduce:
1. Contribute to the default preferences for remote help
2. Click Restore Defaults
3. Both radios always have the same value
Comment 1 Chris Goldthorpe CLA 2010-06-22 17:43:05 EDT
The patch from Bug #316011 has been applied - Fixed.