public static boolean isGroovySourceFile(@NotNull PsiFile file) {
    return file instanceof GroovyFileBase && isGroovySourceFile((GroovyFileBase)file);
  }
public static boolean isGroovySourceFile(@NotNull PsiFile file)