mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Bug 301028 - fix 'restore default' button in XLCompilerPropertiesPage for compiler version - Patch by John Liu
This commit is contained in:
parent
be9d6fad05
commit
3d60e9196b
1 changed files with 11 additions and 3 deletions
|
@ -31,6 +31,9 @@ public class XLCompilerPropertyPage extends FieldEditorPreferencePage implements
|
||||||
|
|
||||||
protected String originalMessage;
|
protected String originalMessage;
|
||||||
|
|
||||||
|
protected Composite versionParent;
|
||||||
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
|
* @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,
|
String[] versionEntries = { PreferenceConstants.P_XL_COMPILER_VERSION_8_NAME,
|
||||||
PreferenceConstants.P_XL_COMPILER_VERSION_9_NAME, PreferenceConstants.P_XL_COMPILER_VERSION_10_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,
|
fVersionEditor = new BuildOptionComboFieldEditor(PreferenceConstants.P_XLC_COMPILER_VERSION,
|
||||||
Messages.XLCompilerPropertyPage_1, versionEntries, null, versionParent);
|
Messages.XLCompilerPropertyPage_1, versionEntries, null, versionParent);
|
||||||
|
@ -153,8 +156,13 @@ public class XLCompilerPropertyPage extends FieldEditorPreferencePage implements
|
||||||
if (fPathEditor != null) {
|
if (fPathEditor != null) {
|
||||||
fPathEditor.setStringValue(currentPath);
|
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);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue