1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 18:26:01 +02:00

Apply patch from 125686 which requires the user to visit the Project Type selection page before selecting Finish in the MBS project wizards

This commit is contained in:
Leo Treggiari 2006-03-07 19:53:50 +00:00
parent 73debc0e33
commit 8bb69fe88f

View file

@ -34,6 +34,8 @@ import org.eclipse.jface.viewers.CheckboxTableViewer;
import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.TableLayout; import org.eclipse.jface.viewers.TableLayout;
import org.eclipse.jface.wizard.IWizardContainer;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.WizardPage; import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT; import org.eclipse.swt.SWT;
import org.eclipse.swt.events.DisposeEvent; import org.eclipse.swt.events.DisposeEvent;
@ -87,6 +89,7 @@ public class CProjectPlatformPage extends WizardPage {
protected String[] projectTypeNames; protected String[] projectTypeNames;
protected ArrayList projectTypes; protected ArrayList projectTypes;
protected IConfiguration configurations[]; protected IConfiguration configurations[];
protected boolean pageHasBeenVisible;
/** /**
* Constructor. * Constructor.
@ -525,6 +528,9 @@ public class CProjectPlatformPage extends WizardPage {
* @return * @return
*/ */
private boolean validatePage() { private boolean validatePage() {
if(!pageHasBeenVisible)
return false;
// TODO some validation ... maybe // TODO some validation ... maybe
if ((tableViewer.getCheckedElements()).length > 0) { if ((tableViewer.getCheckedElements()).length > 0) {
setErrorMessage(null); setErrorMessage(null);
@ -540,4 +546,10 @@ public class CProjectPlatformPage extends WizardPage {
IStatus status = new Status(IStatus.WARNING, id, 0, msg, null); IStatus status = new Status(IStatus.WARNING, id, 0, msg, null);
ManagedBuilderUIPlugin.log(status); ManagedBuilderUIPlugin.log(status);
} }
public void setVisible(boolean visible) {
pageHasBeenVisible = true;
setPageComplete(validatePage());
super.setVisible(visible);
}
} }