ITreeSelection treeSelection = (ITreeSelection) selection;
if (treeSelection.isEmpty())
return EMPTY_WORKING_SET_ARRAY;
List elements = treeSelection.toList();
if (elements.size() == 1) {
Object element = elements.get(0);
TreePath[] paths = treeSelection.getPathsFor(element);
if (paths.length != 1)
return EMPTY_WORKING_SET_ARRAY;