@Nullable IdeaPluginDescriptor checkDependenciesAndReplacements(@NotNull IdeaPluginDescriptor pluginNode) {
    PluginReplacement pluginReplacement = ContainerUtil.find(PluginReplacement.EP_NAME.getExtensions(),
                                                             r -> r.getNewPluginId().equals(pluginNode.getPluginId().getIdString()));
    if (pluginReplacement == null) {
      return null;
    }

    PluginId oldPluginId = pluginReplacement.getOldPluginDescriptor().getPluginId();
    IdeaPluginDescriptor oldPlugin = PluginManagerCore.getPlugin(oldPluginId);
    if (oldPlugin == null) {
      LOG.warn("Plugin with id '" + oldPluginId + "' not found");
      return null;
    }

    if (myPluginEnabler.isDisabled(oldPlugin.getPluginId())) {
      return null;
    }

    AtomicBoolean toDisable = new AtomicBoolean();
    ApplicationManager.getApplication().invokeAndWait(() -> {
      boolean choice = MessageDialogBuilder.yesNo(pluginReplacement.getReplacementMessage(oldPlugin, pluginNode),
                                                  IdeBundle.message("plugin.manager.obsolete.plugins.detected.title"))
        .yesText(IdeBundle.message("plugins.configurable.disable")).noText(Messages.getNoButton()).icon(Messages.getWarningIcon())
        .guessWindowAndAsk();
      toDisable.set(choice);
    }, ModalityState.any());

    return toDisable.get() ? oldPlugin : null;
  }
@Nullable IdeaPluginDescriptor checkDependenciesAndReplacements(@NotNull IdeaPluginDescriptor pluginNode)