@Override
  public boolean canDeleteElement(@NotNull DataContext dataContext) {
    Project project = CommonDataKeys.PROJECT.getData(dataContext);
    if (project == null) return false;

    final PsiElement[] elements = getElementsToDelete(project, dataContext);
    return DeleteHandler.shouldEnableDeleteAction(elements);
  }
@Override
  public boolean canDeleteElement(@NotNull DataContext dataContext)