public static boolean fileSeemsToBeTypeCustomizer(@NotNull final PsiFile file) {
    if (file instanceof GroovyFile && ((GroovyFile)file).isScript()) {
      for (GrStatement statement : ((GroovyFile)file).getStatements()) {
        if (statement instanceof GrMethodCall) {
          GrExpression invoked = ((GrMethodCall)statement).getInvokedExpression();
          if (invoked instanceof GrReferenceExpression &&
              !((GrReferenceExpression)invoked).isQualified() &&
              isCustomizerEvent(((GrReferenceExpression)invoked).getReferenceName())) {
            return true;
          }
        }
      }
    }

    return false;
  }
public static boolean fileSeemsToBeTypeCustomizer(@NotNull final PsiFile file)