boolean (@NotNull PsiElement element) { if (!(element instanceof GrReferenceExpression ref) || ((GrReferenceExpression)element).isQualified()) { return true; } if (isWriteAccess(ref)) { PsiElement target = ref.resolve(); if (target instanceof GrVariable && ((GrVariable)target).getInitializerGroovy() != null || target instanceof GrParameter) { result.add((GrVariable)target); } } return true; }