boolean (PsiParameter parameter) { for (PsiReference reference : ReferencesSearch.search(parameter).findAll()) { PsiElement element = reference.getElement(); if (element instanceof GrReferenceExpression && element.getParent() instanceof GrAssignmentExpression parent && ((GrAssignmentExpression)element.getParent()).getRValue() == element) { GrExpression value = parent.getLValue(); if (value instanceof GrReferenceExpression && ((GrReferenceExpression)value).resolve() instanceof PsiField) return true; } } return false; }