void (PsiElement element) { if (!(element instanceof PsiExpression expression)) { return; } final String newExpressionText = createReplacementText(expression, new StringBuilder()).toString(); PsiReplacementUtil.replaceExpression(expression, newExpressionText); }