void (@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); }