if (classViewer != null) {
Object firstSel = ((StructuredSelection) classViewer.getSelection()).getFirstElement();
if (firstSel instanceof String) {
return (String) firstSel;
} else if (firstSel instanceof Node) {
Node node = ((Node) firstSel);
if (!node.hasChilds()) {
return node.getFullPath();
}
}
}
return null;
}