void (@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) { if (element instanceof PsiLiteralExpression expression) { if (!expression.isTextBlock()) return; String text = buildReplacementText(element, myTransformation); if (text == null) return; replaceTextBlock(expression, text); } else if (element instanceof PsiFragment fragment) { if (!fragment.isTextBlock()) return; String text = buildReplacementText(element, myTransformation); if (text == null) return; PsiReplacementUtil.replaceFragment(fragment, text); } }