public static boolean isSuperMethod(@NotNull PsiMethod method, @NotNull PsiMethod superMethod) {
    HierarchicalMethodSignature signature = method.getHierarchicalMethodSignature();
    for (HierarchicalMethodSignature superSignature : signature.getSuperSignatures()) {
      PsiMethod supsigme = superSignature.getMethod();
      if (superMethod.equals(supsigme) || isSuperMethod(supsigme, superMethod)) return true;
    }

    return false;
  }
public static boolean isSuperMethod(@NotNull PsiMethod method, @NotNull PsiMethod superMethod)