@Nullable
  public static String getGroovyHomePath(@NotNull Module module) {
    if (!DumbService.isDumb(module.getProject())) {
      final VirtualFile local = findJarWithClass(module, SOME_GROOVY_CLASS);
      if (local != null) {
        final VirtualFile parent = local.getParent();
        if (parent != null) {
          if ((LIB.equals(parent.getName()) || EMBEDDABLE.equals(parent.getName())) && parent.getParent() != null) {
            return parent.getParent().getPath();
          }
          return parent.getPath();
        }
      }
    }

    final String home = getGroovyLibraryHome(OrderEnumerator.orderEntries(module).getAllLibrariesAndSdkClassesRoots());
    return StringUtil.isEmpty(home) ? null : home;
  }
@Nullable
  public static String getGroovyHomePath(@NotNull Module module)