private void assertCanApply(@NotNull Map<PluginId, IdeaPluginDescriptorImpl> pluginIdMap) throws ConfigurationException {
    List<IdeaPluginDescriptorImpl> descriptors = new ArrayList<>();
    for (Map.Entry<PluginId, Set<PluginId>> entry : myDependentToRequiredListMap.entrySet()) {
      PluginId pluginId = entry.getKey();

      if (!isLoaded(pluginId)) {
        continue;
      }

      for (PluginId dependencyPluginId : entry.getValue()) {
        if (PluginManagerCore.isModuleDependency(dependencyPluginId)) {
          continue;
        }

        IdeaPluginDescriptorImpl descriptor = pluginIdMap.get(dependencyPluginId);
        if (descriptor != null && !isHidden(descriptor)) {
          descriptors.add(descriptor);
        }
        break;
      }
    }

    if (!descriptors.isEmpty()) {
      Set<String> pluginNames = getPluginNames(descriptors);
      String message = IdeBundle.message("dialog.message.unable.to.apply.changes",
                                         pluginNames.size(),
                                         joinPluginNamesOrIds(pluginNames));
      throw new ConfigurationException(XmlStringUtil.wrapInHtml(message)).withHtmlMessage();
    }
  }
private void assertCanApply(@NotNull Map<PluginId, IdeaPluginDescriptorImpl> pluginIdMap)