IFolder oldParent = eventTemplate == null ? null : eventTemplate.getOldParent();
modelEvent = new SearchMarkEvent(mark, oldParent, root);
}
else if (entity instanceof IFolder) {
IFolder folder = (IFolder) entity;
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;
modelEvent = new LabelEvent(label, root);
}