boolean (ASTNode node) { while (node != null && node.getElementType() == GroovyElementTypes.REFERENCE_ELEMENT) { node = node.getTreeParent(); } return node != null && node.getElementType() == GroovyStubElementTypes.IMPORT; }