void (@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) { if (!myName.endsWith("()")) { PsiLocalVariable variable = PsiTreeUtil.getParentOfType(element, PsiLocalVariable.class); if (variable == null) return; if (VariableAccessUtils.variableIsAssigned(variable)) { new CommentTracker().replace(element, myPatternName); return; } List<PsiReferenceExpression> references = VariableAccessUtils.getVariableReferences(variable, PsiUtil.getVariableCodeBlock(variable, null)); for (PsiReferenceExpression ref : references) { ExpressionUtils.bindReferenceTo(ref, myPatternName); } new CommentTracker().deleteAndRestoreComments(variable); } else { new CommentTracker().replace(element, myPatternName); } }