void (@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) { if (!(element instanceof PsiExpression expression)) { return; } CommentTracker commentTracker = new CommentTracker(); final String expressionText = commentTracker.text(expression); PsiReplacementUtil.replaceExpression(expression, '(' + typeText + ')' + expressionText, commentTracker); }