void (@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) { if (element instanceof PsiTypeCastExpression typeCastExpression) { final PsiElement toReplace = typeCastExpression.getParent() instanceof PsiParenthesizedExpression ? typeCastExpression.getParent() : typeCastExpression; new CommentTracker().replaceAndRestoreComments(toReplace, myVariableName); } }