void (@NotNull DataContext dataContext) { PsiElement[] elements = getPsiElements(dataContext); if (elements == null) return; Project project = CommonDataKeys.PROJECT.getData(dataContext); if (project == null) return; LocalHistoryAction a = LocalHistory.getInstance().startAction(IdeBundle.message("progress.deleting")); try { deletePsiElement(elements, project); } finally { a.finish(); } }