{
WizardSelectionPage selectionPage = new WizardSelectionPage(this);
for (int i = 0; i < n; ++i)
{
Generator generator = (Generator) list.get(i);
selectionPage.addGenerator(generator);
}
selectionPage.expandTree();
addAndLinkPage(GeneratorWizard.SELECTION_PAGE, selectionPage);
}
else if (n == 1)
{
Generator gen = (Generator) list.get(0);
if (gen != null)
{
// Initialize the generator context and settings as if we would have gotten them from an item of newer type
context.setSelectedGenerator(gen);
GeneratorSettings settings = new GeneratorSettings();
settings.setGeneratorName(gen.getName());
context.setGeneratorSettings(settings);
context.setProperty(GeneratorWizard.SETTINGS_PAGE, settings);
}
}
}