boolean (GrReferenceExpression refExpr) { //todo: look more carefully GrExpression qualifierExpression = refExpr.getQualifierExpression(); if (!(qualifierExpression instanceof GrReferenceExpression referenceExpression)) return false; GroovyPsiElement resolvedElement = ResolveUtil.resolveProperty(referenceExpression, referenceExpression.getReferenceName()); if (resolvedElement == null) return false; if (resolvedElement instanceof PsiClass) return true; return false; }