public static @NotNull List<IdeaPluginDescriptorImpl> getDependents(@NotNull IdeaPluginDescriptor rootDescriptor,
                                                                      @NotNull ApplicationInfoEx applicationInfo,
                                                                      @NotNull Map<PluginId, IdeaPluginDescriptorImpl> pluginIdMap) {
    PluginId rootId = rootDescriptor.getPluginId();

    List<IdeaPluginDescriptorImpl> result = new ArrayList<>();
    for (Map.Entry<PluginId, IdeaPluginDescriptorImpl> entry : pluginIdMap.entrySet()) {
      PluginId pluginId = entry.getKey();
      IdeaPluginDescriptorImpl descriptor = entry.getValue();

      if (pluginId.equals(rootId) ||
          applicationInfo.isEssentialPlugin(pluginId) ||
          !descriptor.isEnabled() ||
          isHidden(descriptor)) {
        continue;
      }

      PluginManagerCore.INSTANCE.processAllNonOptionalDependencies(descriptor, pluginIdMap, dependency -> {
        if (dependency.getPluginId().equals(rootId)) {
          result.add(descriptor);
          return FileVisitResult.TERMINATE;
        }
        return FileVisitResult.CONTINUE;
      });
    }

    return Collections.unmodifiableList(result);
  }
public static @NotNull List<IdeaPluginDescriptorImpl> getDependents(@NotNull IdeaPluginDescriptor rootDescriptor,
                                                                      @NotNull ApplicationInfoEx applicationInfo,
                                                                      @NotNull Map<PluginId, IdeaPluginDescriptorImpl> pluginIdMap)