Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVivian Kong2010-01-27 22:26:05 -0500
committerVivian Kong2010-01-27 22:26:05 -0500
commit5653371b937d92a4a6795774f4383b1fcb159df8 (patch)
treea2df9bae364deb9e5f82f3dc7993440aa16171d0
parentfac280b7737f2b52df8019cd7ec8e9c7289b8c6e (diff)
downloadorg.eclipse.cdt-5653371b937d92a4a6795774f4383b1fcb159df8.tar.gz
org.eclipse.cdt-5653371b937d92a4a6795774f4383b1fcb159df8.tar.xz
org.eclipse.cdt-5653371b937d92a4a6795774f4383b1fcb159df8.zip
Bug 301028 - fix 'restore default' button in XLCompilerPropertiesPage for compiler version - Patch by John Liuv201001272235
-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