Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVivian Kong2010-01-28 03:26:22 +0000
committerVivian Kong2010-01-28 03:26:22 +0000
commit817d29c47b4aa49a086c8347c84255b487c77ceb (patch)
tree6c6a1e09b8e1ef3bdcebc600b2ee1181c78c76c8
parentbb42dfe6133f9ea8afa99111bd808a26bf2aad40 (diff)
downloadorg.eclipse.cdt-817d29c47b4aa49a086c8347c84255b487c77ceb.tar.gz
org.eclipse.cdt-817d29c47b4aa49a086c8347c84255b487c77ceb.tar.xz
org.eclipse.cdt-817d29c47b4aa49a086c8347c84255b487c77ceb.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 d9e20810b0c..a4fd1df292d 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