void (@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) { CommentTracker commentTracker = new CommentTracker(); final String replacement; if (element instanceof PsiPrefixExpression prefixExpression) { replacement = calculateReplacementExpression(prefixExpression, commentTracker); } else if (element instanceof PsiBinaryExpression binaryExpression) { replacement = calculateReplacementExpression(binaryExpression, commentTracker); } else { return; } if (replacement == null) { return; } PsiReplacementUtil.replaceExpression((PsiExpression)element, replacement, commentTracker); }