LocalQuickFix (Object... infos) { final PsiNewExpression newExpression = (PsiNewExpression)infos[0]; final PsiExpressionList argumentList = newExpression.getArgumentList(); if (argumentList == null) { return null; } final PsiExpression[] arguments = argumentList.getExpressions(); if (arguments.length == 0) { return null; } final PsiExpression firstArgument = PsiUtil.skipParenthesizedExprDown(arguments[0]); if (firstArgument instanceof PsiLiteralExpression) { return new ReplaceDoubleArgumentWithStringFix("new BigDecimal(\"" + getLiteralText((PsiLiteralExpression)firstArgument) + "\")"); } if (arguments.length == 1 && firstArgument != null) { return new ReplaceDoubleArgumentWithStringFix("BigDecimal.valueOf(" + firstArgument.getText() + ')'); } return null; }