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