mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
bug 292304: XLC New Project Wizard does not like change of heart when users switch from other wizards
Patch from Marc-Andre Laperle
This commit is contained in:
parent
9cfe50b6db
commit
fe2cc5e4fd
1 changed files with 9 additions and 8 deletions
|
@ -63,8 +63,6 @@ public class XLCSettingsWizardPage extends MBSCustomPage {
|
|||
}
|
||||
}
|
||||
|
||||
private boolean fVisited = false;
|
||||
|
||||
private Composite fComposite = null;
|
||||
|
||||
private Text fDirTextBox;
|
||||
|
@ -76,6 +74,7 @@ public class XLCSettingsWizardPage extends MBSCustomPage {
|
|||
*/
|
||||
public XLCSettingsWizardPage(String pageID) {
|
||||
super(pageID);
|
||||
setDefaultPreferences(pageID);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -83,14 +82,20 @@ public class XLCSettingsWizardPage extends MBSCustomPage {
|
|||
*/
|
||||
public XLCSettingsWizardPage() {
|
||||
super(PAGE_ID);
|
||||
setDefaultPreferences(PAGE_ID);
|
||||
}
|
||||
|
||||
private void setDefaultPreferences(String pageID) {
|
||||
String compilerPath = XLCUIPlugin.getDefault().getPreferenceStore().getString(PreferenceConstants.P_XL_COMPILER_ROOT);
|
||||
MBSCustomPageManager.addPageProperty(pageID, PreferenceConstants.P_XL_COMPILER_ROOT, compilerPath);
|
||||
MBSCustomPageManager.addPageProperty(pageID, PreferenceConstants.P_XLC_COMPILER_VERSION, PreferenceConstants.P_XL_COMPILER_VERSION_8);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPage#isCustomPageComplete()
|
||||
*/
|
||||
protected boolean isCustomPageComplete() {
|
||||
// Don't allow the user to finish without visiting the page.
|
||||
return fVisited;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -282,10 +287,6 @@ public class XLCSettingsWizardPage extends MBSCustomPage {
|
|||
*/
|
||||
public void setVisible(boolean visible) {
|
||||
fComposite.setVisible(visible);
|
||||
if (visible) {
|
||||
fVisited = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue