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;
modelEvent = new PreferenceEvent(pref);
} else if (entity instanceof ISearch) {
ISearch search = (ISearch) entity;