1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +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.SelectionChangedEvent;
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.swt.SWT;
import org.eclipse.swt.events.DisposeEvent;
@ -87,7 +89,8 @@ public class CProjectPlatformPage extends WizardPage {
protected String[] projectTypeNames;
protected ArrayList projectTypes;
protected IConfiguration configurations[];
protected boolean pageHasBeenVisible;
/**
* Constructor.
* @param pageName
@ -525,6 +528,9 @@ public class CProjectPlatformPage extends WizardPage {
* @return
*/
private boolean validatePage() {
if(!pageHasBeenVisible)
return false;
// TODO some validation ... maybe
if ((tableViewer.getCheckedElements()).length > 0) {
setErrorMessage(null);
@ -534,10 +540,16 @@ public class CProjectPlatformPage extends WizardPage {
return false;
}
}
private void log(String msg) {
String id = ManagedBuilderUIPlugin.getUniqueIdentifier();
IStatus status = new Status(IStatus.WARNING, id, 0, msg, null);
ManagedBuilderUIPlugin.log(status);
}
private void log(String msg) {
String id = ManagedBuilderUIPlugin.getUniqueIdentifier();
IStatus status = new Status(IStatus.WARNING, id, 0, msg, null);
ManagedBuilderUIPlugin.log(status);
}
public void setVisible(boolean visible) {
pageHasBeenVisible = true;
setPageComplete(validatePage());
super.setVisible(visible);
}
}