boolean (@NotNull PsiMember member, @NotNull PsiFile containingFile) { if (member instanceof PsiClass) return false; if (!(containingFile instanceof PsiJavaFile)) return true; // Groovy field can be referenced from Java by getter if (member instanceof PsiField) return false; //Java field cannot be referenced by anything but its name if (member instanceof PsiMethod) { return PropertyUtilBase.isSimplePropertyAccessor((PsiMethod)member); //Java accessors can be referenced by field name from Groovy } return false; }