Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVivian Kong2010-01-27 22:26:29 -0500
committerVivian Kong2010-01-27 22:26:29 -0500
commit3d60e9196b64dca3ab710715568a0cd2284386cb (patch)
tree8e4de2acfd44bb5dfa8457f63a25a729b5e0c5fa
parentbe9d6fad055f4abf7c5079d718cd06e8c2b6e1d3 (diff)
downloadorg.eclipse.cdt-3d60e9196b64dca3ab710715568a0cd2284386cb.tar.gz
org.eclipse.cdt-3d60e9196b64dca3ab710715568a0cd2284386cb.tar.xz
org.eclipse.cdt-3d60e9196b64dca3ab710715568a0cd2284386cb.zip
Bug 301028 - fix 'restore default' button in XLCompilerPropertiesPage for compiler version - Patch by John Liu
-rw-r--r--xlc/org.eclipse.cdt.managedbuilder.xlc.ui/src/org/eclipse/cdt/managedbuilder/xlc/ui/properties/XLCompilerPropertyPage.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/xlc/org.eclipse.cdt.managedbuilder.xlc.ui/src/org/eclipse/cdt/managedbuilder/xlc/ui/properties/XLCompilerPropertyPage.java b/xlc/org.eclipse.cdt.managedbuilder.xlc.ui/src/org/eclipse/cdt/managedbuilder/xlc/ui/properties/XLCompilerPropertyPage.java
index d9e20810b0..a4fd1df292 100644
--- a/xlc/org.eclipse.cdt.managedbuilder.xlc.ui/src/org/eclipse/cdt/managedbuilder/xlc/ui/properties/XLCompilerPropertyPage.java
+++ b/xlc/org.eclipse.cdt.managedbuilder.xlc.ui/src/org/eclipse/cdt/managedbuilder/xlc/ui/properties/XLCompilerPropertyPage.java
@@ -30,7 +30,10 @@ import org.eclipse.ui.IWorkbenchPropertyPage;
public class XLCompilerPropertyPage extends FieldEditorPreferencePage implements IWorkbenchPropertyPage {
protected String originalMessage;
-
+
+ protected Composite versionParent;
+
+
/* (non-Javadoc)
* @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
*/
@@ -102,7 +105,7 @@ public class XLCompilerPropertyPage extends FieldEditorPreferencePage implements
String[] versionEntries = { PreferenceConstants.P_XL_COMPILER_VERSION_8_NAME,
PreferenceConstants.P_XL_COMPILER_VERSION_9_NAME, PreferenceConstants.P_XL_COMPILER_VERSION_10_NAME };
- Composite versionParent = getFieldEditorParent();
+ versionParent = getFieldEditorParent();
fVersionEditor = new BuildOptionComboFieldEditor(PreferenceConstants.P_XLC_COMPILER_VERSION,
Messages.XLCompilerPropertyPage_1, versionEntries, null, versionParent);
@@ -153,8 +156,13 @@ public class XLCompilerPropertyPage extends FieldEditorPreferencePage implements
if (fPathEditor != null) {
fPathEditor.setStringValue(currentPath);
}
+ //set the selection to default setting
+ fVersionEditor.setPreferenceStore(prefStore);
+ fVersionEditor.setPreferenceName(PreferenceConstants.P_XLC_COMPILER_VERSION);
+ fVersionEditor.loadDefault();
+ //set the text entry to default setting
+ fVersionEditor.getComboControl(versionParent).setText(currentVersionLabel);
- fVersionEditor.getComboControl(getFieldEditorParent()).setText(currentVersionLabel);
}

Back to the top