public static void refreshSkeletonsOfSdk(@Nullable Project project,
                                           @Nullable Component ownerComponent,
                                           @Nullable String skeletonsPath,
                                           @NotNull Sdk sdk)
    throws InvalidSdkException {
    final ProgressIndicator indicator = ProgressManager.getInstance().getProgressIndicator();
    final String homePath = sdk.getHomePath();
    if (skeletonsPath == null) {
      LOG.info("Could not find skeletons path for SDK path " + homePath);
    }
    else {
      LOG.info("Refreshing skeletons for " + homePath);
      final PySkeletonRefresher refresher = new PySkeletonRefresher(project, ownerComponent, sdk, skeletonsPath, indicator, null);

      changeGeneratingSkeletons(1);
      try {
        final List<String> errors = refresher.regenerateSkeletons();
        if (!errors.isEmpty()) {
          LOG.warn(PyBundle.message("sdk.some.skeletons.failed"));
          for (String moduleName : errors) {
            LOG.warn(moduleName);
          }
        }
      }
      catch (ExecutionException e) {
        LOG.error(e);
      }
      finally {
        changeGeneratingSkeletons(-1);
      }
    }
  }
public static void refreshSkeletonsOfSdk(@Nullable Project project,
                                           @Nullable Component ownerComponent,
                                           @Nullable String skeletonsPath,
                                           @NotNull Sdk sdk)