private static boolean isEnumMethodUsed(@NotNull Project project,
                                          @NotNull PsiFile containingFile,
                                          @NotNull PsiEnumConstant enumConstant,
                                          @NotNull GlobalUsageHelper helper) {
    final PsiClass containingClass = enumConstant.getContainingClass();
    if (!(containingClass instanceof PsiClassImpl)) return true;
    final PsiMethod valuesMethod = ((PsiClassImpl)containingClass).getValuesMethod();
    final PsiMethod valueOfMethod = ((PsiClassImpl)containingClass).getValueOfMethod();
    return valuesMethod == null || isMethodUsed(project, containingFile, valuesMethod, helper) ||
           valueOfMethod == null || isMethodUsed(project, containingFile, valueOfMethod, helper);
  }
private static boolean isEnumMethodUsed(@NotNull Project project,
                                          @NotNull PsiFile containingFile,
                                          @NotNull PsiEnumConstant enumConstant,
                                          @NotNull GlobalUsageHelper helper)