void (@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) { PsiMethodCallExpression call = PsiTreeUtil.getParentOfType(element, PsiMethodCallExpression.class); if (call == null) return; PsiExpression[] args = call.getArgumentList().getExpressions(); if (args.length != 2) return; CommentTracker ct = new CommentTracker(); String replacement; if (myEquality) { replacement = ct.text(args[0], EQUALITY_PRECEDENCE) + "==" + ct.text(args[1], EQUALITY_PRECEDENCE); } else { replacement = ct.text(args[0], METHOD_CALL_PRECEDENCE) + ".equals(" + ct.text(args[1]) + ")"; } ct.replaceAndRestoreComments(call, replacement); }