boolean (@NotNull DataContext dataContext) { PsiElement aClass = getSelectedElement(dataContext); if (!canBeDeleted(aClass)) { return false; } PsiElement[] elements = {aClass}; return DeleteHandler.shouldEnableDeleteAction(elements); }