// this
// call back is no longer needed
getWizard().getMainPage().refreshTemplateInUI();
}
WizardUIInfo info = getUIInfo(template);
if (info == null || !hasTemplateWizardPages()) {
// Update the buttons so that the "Next" button is disabled.
// This is done
// indirectly by the wizard which calls hasNext() once
// again to determine the button states based on data
// already downloaded.
getWizard().getContainer().updateButtons();
return null;
}
ITemplateWizardPage previousPage = null;
ITemplateWizardPage templatePage = null;
ITemplateWizardPage firstPage = null;
try {
for (int i = 0; i < info.getPageCount(); i++) {
List<WizardUIInfoElement> pageElements = info.getElementsForPage(i);
if (pageElements == null || pageElements.isEmpty()) {
continue;
}
templatePage = new NewTemplateWizardPage(info.getPage(i).getDescription(), template,
new TemplateInputCollector(pageElements));
templatePage.setWizard(getWizard());
// Always set a new first template page, as the template
// selection may have changed and may