@Override
  public @NotNull PsiElementVisitor buildVisitor(@NotNull final ProblemsHolder holder, boolean isOnTheFly) {
    if (!PsiUtil.isAvailable(JavaFeature.UNDERSCORES, holder.getFile())) {
      return PsiElementVisitor.EMPTY_VISITOR;
    }
    return new JavaElementVisitor() {
      @Override
      public void visitLiteralExpression(@NotNull final PsiLiteralExpression literalExpression) {
        final PsiType type = literalExpression.getType();
        if (!PsiTypes.intType().equals(type) && !PsiTypes.longType().equals(type) &&
            !PsiTypes.floatType().equals(type) && !PsiTypes.doubleType().equals(type)) return;

        final String text = literalExpression.getText();
        if (text == null || text.contains("_")) return;

        final String converted = LiteralFormatUtil.format(text, type);
        if (converted.length() == text.length()) return;

        final String displayMessage = JavaBundle.message("inspection.insert.literal.underscores.display.name");
        final String actionText = CommonQuickFixBundle.message("fix.replace.x.with.y", text, converted);
        final String familyName = JavaBundle.message("inspection.insert.literal.underscores.family.name");

        final ConvertNumericLiteralQuickFix quickFix = new ConvertNumericLiteralQuickFix(converted, actionText, familyName);

        holder.registerProblem(literalExpression, displayMessage, quickFix);
      }
    };
  }
@Override
  public @NotNull PsiElementVisitor buildVisitor(@NotNull final ProblemsHolder holder, boolean isOnTheFly)