String projectName = getProjectName();
if (projectName == null) {
return false;
}
IWizard wizard = getWizard();
if (wizard instanceof ExampleProjectCreationWizard) {
IWizardPage[] pages = wizard.getPages();
for (int i = 0; i < pages.length; i++) {
if ((pages[i] != this) && (pages[i] instanceof ExampleProjectCreationWizardPage)) {
if (projectName.equals(((ExampleProjectCreationWizardPage) pages[i]).getProjectName())) {
setErrorMessage(XMLWizardsMessages.ExampleProjectCreationWizardPage_error_alreadyexists);
return false;