@Override
public void widgetSelected(SelectionEvent e) {
IStructuredSelection selection = (IStructuredSelection) resourcesTreeViewer.getSelection();
for (Object element : selection.toList()) {
if (element instanceof IResource) {
IResource res = (IResource) element;
try {
res.getParent().removeResource(res.getId());
} catch (ResourceException e1) {
ErrorDialog.openError(PlatformUI.getWorkbench().getDisplay().getActiveShell(),
"Resource Deletion", "Resource deletion failed", new Status(IStatus.ERROR, "q_impress", e1.getMessage(), e1));
}
}