memento.putString(IWorkbenchConstants.TAG_LABEL, getLabel());
memento.putString(IWorkbenchConstants.TAG_EDIT_PAGE_ID, editPageId);
Iterator iterator = elements.iterator();
while (iterator.hasNext()) {
IAdaptable adaptable = (IAdaptable) iterator.next();
IPersistableElement persistable = (IPersistableElement) Util
.getAdapter(adaptable, IPersistableElement.class);
if (persistable != null) {
IMemento itemMemento = memento
.createChild(IWorkbenchConstants.TAG_ITEM);
itemMemento.putString(IWorkbenchConstants.TAG_FACTORY_ID,
persistable.getFactoryId());
persistable.saveState(itemMemento);
}
}
}
}