ISelection selection = viewer.getSelection();
if (selection instanceof IStructuredSelection) {
Object obj = ((IStructuredSelection) selection).getFirstElement();
if (obj != null) {
logger.debug("Removing 1 Object");
contentProvider.removeEntry(obj);
}
} else {
// error handling: Unexpected case no IStructuredSelection
String msg = "Selected Element is not an instance of IStructuredSelection";