void finishInstall(@NotNull IdeaPluginDescriptor descriptor,
                     @Nullable IdeaPluginDescriptorImpl installedDescriptor,
                     boolean success,
                     boolean showErrors,
                     boolean restartRequired) {
    InstallPluginInfo info = finishInstall(descriptor);

    if (myInstallingWithUpdatesPlugins.isEmpty()) {
      myTopController.showProgress(false);
    }

    PluginId pluginId = descriptor.getPluginId();
    List<ListPluginComponent> marketplaceComponents = myMarketplacePluginComponentMap.get(pluginId);
    if (marketplaceComponents != null) {
      for (ListPluginComponent gridComponent : marketplaceComponents) {
        if (installedDescriptor != null) {
          gridComponent.setPluginDescriptor(installedDescriptor);
        }
        gridComponent.hideProgress(success, restartRequired);
        if (gridComponent.myInstalledDescriptorForMarketplace != null) {
          gridComponent.updateErrors();
        }
      }
    }
    List<ListPluginComponent> installedComponents = myInstalledPluginComponentMap.get(pluginId);
    if (installedComponents != null) {
      for (ListPluginComponent listComponent : installedComponents) {
        if (installedDescriptor != null) {
          listComponent.setPluginDescriptor(installedDescriptor);
        }
        listComponent.hideProgress(success, restartRequired);
        listComponent.updateErrors();
      }
    }
    for (PluginDetailsPageComponent panel : myDetailPanels) {
      if (panel.isShowingPlugin(descriptor)) {
        panel.setPlugin(installedDescriptor);
        panel.hideProgress(success, restartRequired);
      }
    }

    if (info.install) {
      if (myInstalling != null && myInstalling.ui != null) {
        clearInstallingProgress(descriptor);
        if (myInstallingPlugins.isEmpty()) {
          myInstalledPanel.removeGroup(myInstalling);
        }
        else {
          myInstalledPanel.removeFromGroup(myInstalling, descriptor);
          myInstalling.titleWithCount();
        }
        myInstalledPanel.doLayout();
      }
      if (success) {
        appendOrUpdateDescriptor(installedDescriptor != null ? installedDescriptor : descriptor, restartRequired);
        appendDependsAfterInstall(success, restartRequired);
        if (installedDescriptor == null && descriptor instanceof PluginNode && myDownloaded != null && myDownloaded.ui != null) {
          ListPluginComponent component = myDownloaded.ui.findComponent(descriptor);
          if (component != null) {
            component.setInstalledPluginMarketplaceNode((PluginNode)descriptor);
          }
        }
      }
      else if (myCancelInstallCallback != null) {
        myCancelInstallCallback.accept(descriptor);
      }
    }
    else if (success) {
      if (myDownloaded != null && myDownloaded.ui != null && restartRequired) {
        ListPluginComponent component = myDownloaded.ui.findComponent(pluginId);
        if (component != null) {
          component.enableRestart();
        }
      }
    }
    else {
      myPluginUpdatesService.finishUpdate();
    }

    info.indicator.cancel();

    if (AccessibleAnnouncerUtil.isAnnouncingAvailable()) {
      JFrame frame = WindowManager.getInstance().findVisibleFrame();
      String key = success ? "plugins.configurable.plugin.installing.success" : "plugins.configurable.plugin.installing.failed";
      String message = IdeBundle.message(key, descriptor.getName());
      AccessibleAnnouncerUtil.announce(frame, message, true);
    }

    if (success) {
      needRestart |= restartRequired;
    }
    else if (showErrors) {
      Messages.showErrorDialog(getProject(), IdeBundle.message("plugins.configurable.plugin.installing.failed", descriptor.getName()),
                               IdeBundle.message("action.download.and.install.plugin"));
    }
  }
void finishInstall(@NotNull IdeaPluginDescriptor descriptor,
                     @Nullable IdeaPluginDescriptorImpl installedDescriptor,
                     boolean success,
                     boolean showErrors,
                     boolean restartRequired)