void (@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) { PsiElement parent = element.getParent(); if (parent == null) return; if (!(parent.getParent() instanceof PsiMethodCallExpression callExpression)) { return; } PsiExpressionList argumentList = callExpression.getArgumentList(); PsiExpression[] arguments = argumentList.getExpressions(); if (arguments.length != 1) { return; } PsiExpression argument = arguments[0]; CommentTracker ct = new CommentTracker(); PsiTypeCastExpression castExpression = (PsiTypeCastExpression)ct .replaceAndRestoreComments(callExpression, "(double)" + ct.text(argument, PsiPrecedenceUtil.TYPE_CAST_PRECEDENCE)); if (RedundantCastUtil.isCastRedundant(castExpression)) { RemoveRedundantCastUtil.removeCast(castExpression); } }