boolean (GroovyResolveResult result) { PsiElement element = result.getElement(); if (element instanceof PsiMethod) { String name = ((PsiMethod)element).getName(); if (!name.startsWith("print")) return false; if (element instanceof GrGdkMethod) element = ((GrGdkMethod)element).getStaticMethod(); PsiClass aClass = ((PsiMethod)element).getContainingClass(); if (aClass != null) { String qname = aClass.getQualifiedName(); return GroovyCommonClassNames.DEFAULT_GROOVY_METHODS.equals(qname); } } return false; }