void (@NotNull PsiReferenceExpression expression) { super.visitReferenceExpression(expression); if (!ExpressionUtils.isReferenceTo(expression, myVariable)) return; PsiElement parent = PsiUtil.skipParenthesizedExprUp(expression).getParent(); PsiMethodCallExpression call = ExpressionUtils.getCallForQualifier(expression); if (call != null) { replaceInstanceCall(call); } else if (parent instanceof PsiAssignmentExpression assignment) { if (!ExpressionUtils.isReferenceTo(assignment.getLExpression(), myVariable)) return; tryReplaceStaticCall(assignment.getRExpression()); } }