boolean (@NotNull DataContext dataContext) { Project project = CommonDataKeys.PROJECT.getData(dataContext); if (project == null) return false; final PsiElement[] elements = getElementsToDelete(project, dataContext); return DeleteHandler.shouldEnableDeleteAction(elements); }