# HG changeset patch # User timkelly # Date 1267543295 21600 # Node ID e9c3c381af2fdb5cf654c72187f4fe60b1229196 # Parent 6014951a52d756afc784f4d1ec8523ffeeedac1e Clean up some code after review with David D. on bug fix 10742 diff -r 6014951a52d7 -r e9c3c381af2f project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/importWizards/BldInfSelectionPage.java --- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/importWizards/BldInfSelectionPage.java Tue Mar 02 08:24:40 2010 -0600 +++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/importWizards/BldInfSelectionPage.java Tue Mar 02 09:21:35 2010 -0600 @@ -29,6 +29,7 @@ import org.eclipse.jface.dialogs.IDialogSettings; import org.eclipse.jface.wizard.WizardPage; import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.graphics.Font; @@ -119,12 +120,7 @@ builderComposite = new BuilderSelectionComposite(parent); builderComposite.createControls(); - builderComposite.getBuilderCombo().addSelectionListener(new SelectionListener() { - - public void widgetDefaultSelected(SelectionEvent e) { - widgetSelected(e); - } - + builderComposite.getBuilderCombo().addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { setPageComplete(validatePage()); } @@ -207,7 +203,7 @@ if (builderComposite != null) { - IStatus status = builderComposite.validatePage(); + IStatus status = builderComposite.validate(); if (status != null){ // Get the level from the status. int level = getMessageLevelFromIStatus(status); diff -r 6014951a52d7 -r e9c3c381af2f project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/messages.properties --- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/messages.properties Tue Mar 02 08:24:40 2010 -0600 +++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/messages.properties Tue Mar 02 09:21:35 2010 -0600 @@ -2,7 +2,7 @@ NewProjectPage.NameBeginWithDigitError=Project names can not begin with a digit NewProjectPage.InvalidProjectName={0} is not a valid project name NewProjectPage.builderLabel=Builder: -NewProjectPage.builderToolTip=Select the builder to use for this project. SBSv1 = abld | SBSv2 = Raptor +NewProjectPage.builderToolTip=Select the builder to use for this project. SBSv1 (abld) or SBSv2 (Raptor) NewProjectPage.ProjectNameWithPeriodError=Project names can not contain periods NewProjectPage.sbsv1=SBSv1 NewProjectPage.sbsv2=SBSv2 diff -r 6014951a52d7 -r e9c3c381af2f project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/sharedui/BuilderSelectionComposite.java --- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/sharedui/BuilderSelectionComposite.java Tue Mar 02 08:24:40 2010 -0600 +++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/sharedui/BuilderSelectionComposite.java Tue Mar 02 09:21:35 2010 -0600 @@ -73,7 +73,7 @@ * listen for changes on the builder combo via {@link #getBuilderCombo()} * @return null for no error, otherwise a string for the error message */ - public IStatus validatePage() { + public IStatus validate() { useSBSv2Builder = true; IStatus status = null; if (builderCombo != null && builderCombo.getSelectionIndex() == 1) { @@ -135,7 +135,9 @@ /** * Get the builder combo that the user select the builder (e.g. SBSv1 or SBSv2) - * when creating projects. + * when creating projects. This is currently used by clients to listen for changes to the builder combo. + * TODO: This probably is not the most friendly method. After review we decided it would be cleaner for + * clients to pass in a validator interface (e.g. IBuildComboValidator) and make call backs on that. * @return the Combo */ public Combo getBuilderCombo(){ diff -r 6014951a52d7 -r e9c3c381af2f project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/project/ui/sharedui/NewProjectPage.java --- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/project/ui/sharedui/NewProjectPage.java Tue Mar 02 08:24:40 2010 -0600 +++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/project/ui/sharedui/NewProjectPage.java Tue Mar 02 09:21:35 2010 -0600 @@ -29,8 +29,8 @@ import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.jface.dialogs.IDialogSettings; +import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.ui.dialogs.WizardNewProjectCreationPage; @@ -156,7 +156,7 @@ if (builderComposite != null) { - IStatus status = builderComposite.validatePage(); + IStatus status = builderComposite.validate(); if (status != null){ // Get the level from the status. int level = getMessageLevelFromIStatus(status); @@ -245,12 +245,7 @@ if (control instanceof Composite) { builderComposite = new BuilderSelectionComposite((Composite)control); builderComposite.createControls(); - builderComposite.getBuilderCombo().addSelectionListener(new SelectionListener() { - - public void widgetDefaultSelected(SelectionEvent e) { - widgetSelected(e); - } - + builderComposite.getBuilderCombo().addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { setPageComplete(validatePage()); } diff -r 6014951a52d7 -r e9c3c381af2f qt/com.nokia.carbide.cpp.qt.ui/src/com/nokia/carbide/cpp/internal/qt/ui/wizard/QtProFileSelectionPage.java --- a/qt/com.nokia.carbide.cpp.qt.ui/src/com/nokia/carbide/cpp/internal/qt/ui/wizard/QtProFileSelectionPage.java Tue Mar 02 08:24:40 2010 -0600 +++ b/qt/com.nokia.carbide.cpp.qt.ui/src/com/nokia/carbide/cpp/internal/qt/ui/wizard/QtProFileSelectionPage.java Tue Mar 02 09:21:35 2010 -0600 @@ -32,6 +32,7 @@ import org.eclipse.jface.dialogs.IDialogSettings; import org.eclipse.jface.wizard.WizardPage; import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.graphics.Font; @@ -120,12 +121,7 @@ builderComposite = new BuilderSelectionComposite(parent); builderComposite.createControls(); - builderComposite.getBuilderCombo().addSelectionListener(new SelectionListener() { - - public void widgetDefaultSelected(SelectionEvent e) { - widgetSelected(e); - } - + builderComposite.getBuilderCombo().addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { setPageComplete(validatePage()); } @@ -248,7 +244,7 @@ if (builderComposite != null) { - IStatus status = builderComposite.validatePage(); + IStatus status = builderComposite.validate(); if (status != null){ // Get the level from the status. int level = getMessageLevelFromIStatus(status);