if (object instanceof WizardCollectionElement) {
// TODO: should we move child wizards to the "other" node?
WizardCollectionElement collection = (WizardCollectionElement) object;
collection.getParentCollection().remove(collection);
} else if (object instanceof WorkbenchWizardElement) {
WorkbenchWizardElement wizard = (WorkbenchWizardElement) object;
WizardCollectionElement parent = wizard.getCollectionElement();
if (parent != null) {
parent.remove(wizard);
}
IWizardDescriptor[] primaryWizards = getPrimaryWizards();
for (int j = 0; j < primaryWizards.length; j++) {