FolderEvent eventTemplate = (FolderEvent) template;
IFolder oldParent = eventTemplate == null ? null : eventTemplate.getOldParent();
modelEvent = new FolderEvent(folder, oldParent, root);
} else if (entity instanceof ILabel) {
ILabel label = (ILabel) entity;
LabelEvent eventTemplate = (LabelEvent) template;
ILabel oldLabel = eventTemplate == null ? null : eventTemplate.getOldLabel();
modelEvent = new LabelEvent(oldLabel, label, root);
} else if (entity instanceof ISearchCondition) {
ISearchCondition searchCond = (ISearchCondition) entity;
modelEvent = new SearchConditionEvent(searchCond, root);
} else if (entity instanceof IPreference) {
IPreference pref = (IPreference) entity;