/* (non-Javadoc)
* @see org.eclipse.core.runtime.dynamicHelpers.IExtensionChangeHandler#addExtension(org.eclipse.core.runtime.dynamicHelpers.IExtensionTracker, org.eclipse.core.runtime.IExtension)
*/
public void addExtension(IExtensionTracker tracker, IExtension extension) {
WizardsRegistryReader reader = new WizardsRegistryReader(getPlugin(),
getExtensionPoint());
reader.setInitialCollection(getWizardElements());
IConfigurationElement[] configurationElements = extension
.getConfigurationElements();
for (int i = 0; i < configurationElements.length; i++) {
reader.readElement(configurationElements[i]);
}
// no need to reset the wizard elements - getWizardElements will parse
// the
// results of the registry reading
setWizardElements(reader.getWizardElements());
// reregister all object handles - it'd be better to process the deltas
// in this case
registerWizards(getWizardElements());
// handle the primary wizards
WorkbenchWizardElement[] additionalPrimary = reader.getPrimaryWizards();
if (additionalPrimary.length == 0) {
return;
}
IWizardDescriptor[] localPrimaryWizards = getPrimaryWizards();
WorkbenchWizardElement[] newPrimary = new WorkbenchWizardElement[additionalPrimary.length