mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42: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:
parent
73debc0e33
commit
8bb69fe88f
1 changed files with 19 additions and 7 deletions
|
@ -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,6 +89,7 @@ public class CProjectPlatformPage extends WizardPage {
|
|||
protected String[] projectTypeNames;
|
||||
protected ArrayList projectTypes;
|
||||
protected IConfiguration configurations[];
|
||||
protected boolean pageHasBeenVisible;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
|
@ -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);
|
||||
|
@ -535,9 +541,15 @@ public class CProjectPlatformPage extends WizardPage {
|
|||
}
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue