boolean checkMissingDependencies(@NotNull IdeaPluginDescriptor pluginNode,
                                   @Nullable List<PluginId> pluginIds) {
    // check for dependent plugins at first.
    List<IdeaPluginDependency> dependencies = pluginNode.getDependencies();
    if (dependencies.isEmpty()) {
      return true;
    }

    // prepare plugins list for install
    final List<PluginNode> depends = new ArrayList<>();
    final List<PluginNode> optionalDeps = new ArrayList<>();
    for (IdeaPluginDependency dependency : dependencies) {
      PluginId depPluginId = dependency.getPluginId();

      if (PluginManagerCore.isModuleDependency(depPluginId)) {
        IdeaPluginDescriptorImpl descriptorByModule = PluginManagerCore.INSTANCE.findPluginByModuleDependency(depPluginId);
        PluginId pluginIdByModule = descriptorByModule != null ?
                                    descriptorByModule.getPluginId() :
                                    getCachedPluginId(depPluginId.getIdString());

        if (pluginIdByModule == null) continue;
        depPluginId = pluginIdByModule;
      }
      if (PluginManagerCore.isPluginInstalled(depPluginId) ||
          InstalledPluginsState.getInstance().wasInstalled(depPluginId) ||
          InstalledPluginsState.getInstance().wasInstalledWithoutRestart(depPluginId) ||
          pluginIds != null && pluginIds.contains(depPluginId)) {
        // ignore installed or installing plugins
        continue;
      }

      PluginNode depPluginDescriptor = findPluginInRepo(depPluginId);
      if (depPluginDescriptor != null) {
        (dependency.isOptional() ? optionalDeps : depends).add(depPluginDescriptor);
      }
    }

    if (!prepareDependencies(pluginNode, depends, "plugin.manager.dependencies.detected.title",
                             "plugin.manager.dependencies.detected.message", false)) {
      return false;
    }

    return !Registry.is("ide.plugins.suggest.install.optional.dependencies") ||
           prepareDependencies(pluginNode, optionalDeps, "plugin.manager.optional.dependencies.detected.title",
                               "plugin.manager.optional.dependencies.detected.message", true);
  }
boolean checkMissingDependencies(@NotNull IdeaPluginDescriptor pluginNode,
                                   @Nullable List<PluginId> pluginIds)