List<T> sel = getSelectedEntities();
return sel.isEmpty() ? null : sel.get(0);
}
private T getSingleSelection() {
OrderedSelection sel = treeSelSrc.getSelection();
if (sel.size() == 1) {
IntegrationEntity entity = (IntegrationEntity) sel.head();
if (isValidType(entity)) {
return clazz.cast(entity);
}
}
return null;