private static List<PsiMethod> findAllSuperMethods(PsiMethod method) {
    final List<PsiMethod> result = new ArrayList<>();
    SuperMethodsSearch.search(method, null, true, false).forEach(method12 -> {
      ProgressManager.checkCanceled();
      result.add(method12.getMethod());
      return true;
    });
    result.sort((method1, method2) -> {
      // methods from deepest super classes first
      final PsiClass aClass1 = method1.getContainingClass();
      final PsiClass aClass2 = method2.getContainingClass();
      if (aClass1 == null || aClass2 == null || aClass1.equals(aClass2)) {
        return 0;
      }
      if (aClass1.isInterface() && !aClass2.isInterface()) {
        return -1;
      }
      if (!aClass1.isInterface() && aClass2.isInterface()) {
        return 1;
      }
      if (aClass1.isInheritor(aClass2, true)) {
        return 1;
      }
      if (aClass2.isInheritor(aClass1, true)) {
        return -1;
      }
      final String name1 = aClass1.getName();
      final String name2 = aClass2.getName();
      return StringUtil.compare(name1, name2, false);
    });
    return result;
  }
private static List<PsiMethod> findAllSuperMethods(PsiMethod method)