boolean (GrReferenceExpression ref, PsiMethod patternMethod) { PsiType qualifierType = PsiImplUtil.getQualifierType(ref); if (!(qualifierType instanceof PsiClassType)) return false; PsiClass resolved = ((PsiClassType)qualifierType).resolve(); if (resolved == null) return false; PsiMethod found = resolved.findMethodBySignature(patternMethod, true); if (found == null) return false; return isNotFromGroovyObject(found); }