private static HighlightInfo.Builder getSameErasureMessage(boolean sameClass, @NotNull PsiMethod method, @NotNull PsiMethod superMethod,
                                                             @NotNull TextRange textRange) {
    @NonNls String key = sameClass ? "generics.methods.have.same.erasure" :
                         method.hasModifierProperty(PsiModifier.STATIC) ?
                         "generics.methods.have.same.erasure.hide" :
                         "generics.methods.have.same.erasure.override";
    String description = JavaErrorBundle.message(key, HighlightMethodUtil.createClashMethodMessage(method, superMethod, !sameClass));
    HighlightInfo.Builder info =
      HighlightInfo.newHighlightInfo(HighlightInfoType.ERROR).range(textRange).descriptionAndTooltip(description);
    if (!(method instanceof SyntheticElement)) {
      IntentionAction action = QuickFixFactory.getInstance().createSameErasureButDifferentMethodsFix(method, superMethod);
      info.registerFix(action, null, null, null, null);
    }

    return info;
  }
private static HighlightInfo.Builder getSameErasureMessage(boolean sameClass, @NotNull PsiMethod method, @NotNull PsiMethod superMethod,
                                                             @NotNull TextRange textRange)