private void showPlugin(@Nullable ListPluginComponent component, boolean multiSelection) {
    if (myShowComponent == component && (component == null || myUpdateDescriptor == component.myUpdateDescriptor)) {
      return;
    }
    myShowComponent = component;

    if (myIndicator != null) {
      MyPluginModel.removeProgress(getDescriptorForActions(), myIndicator);
      hideProgress(false, false);
    }

    if (component == null) {
      myPlugin = myUpdateDescriptor = myInstalledDescriptorForMarketplace = null;
      select(1, true);
      setEmptyState(multiSelection ? EmptyState.MULTI_SELECT : EmptyState.NONE_SELECTED);
    }
    else {
      boolean syncLoading = true;
      IdeaPluginDescriptor descriptor = component.getPluginDescriptor();
      if (descriptor instanceof PluginNode node) {
        if (!node.detailsLoaded()) {
          syncLoading = false;
          doLoad(component, () -> {
            MarketplaceRequests marketplace = MarketplaceRequests.getInstance();

            PluginNode pluginNode = marketplace.loadPluginDetails(node);
            if (pluginNode == null) {
              return;
            }

            loadAllPluginDetails(marketplace, node, pluginNode);
            component.setPluginDescriptor(pluginNode);
          });
        }
        else if (!node.isConverted() &&
                 (node.getScreenShots() == null || node.getReviewComments() == null || node.getDependencyNames() == null)) {
          syncLoading = false;
          doLoad(component, () -> {
            MarketplaceRequests marketplace = MarketplaceRequests.getInstance();

            if (node.getScreenShots() == null && node.getExternalPluginIdForScreenShots() != null) {
              IntellijPluginMetadata metadata = marketplace.loadPluginMetadata(node.getExternalPluginIdForScreenShots());
              if (metadata != null) {
                if (metadata.getScreenshots() != null) {
                  node.setScreenShots(metadata.getScreenshots());
                }
                metadata.toPluginNode(node);
              }
            }
            if (node.getReviewComments() == null) {
              loadReviews(marketplace, node, node);
            }
            if (node.getDependencyNames() == null) {
              loadDependencyNames(marketplace, node);
            }
          });
        }
        else if (!node.isConverted() && !myMarketplace) {
          component.setInstalledPluginMarketplaceNode(node);
        }
      }
      else if (!descriptor.isBundled() && component.getInstalledPluginMarketplaceNode() == null) {
        syncLoading = false;
        doLoad(component, () -> {
          MarketplaceRequests marketplace = MarketplaceRequests.getInstance();
          PluginNode node = marketplace.getLastCompatiblePluginUpdate(component.getPluginDescriptor().getPluginId());

          if (node != null) {
            List<IdeCompatibleUpdate> update =
              MarketplaceRequests.getLastCompatiblePluginUpdate(Set.of(component.getPluginDescriptor().getPluginId()));
            if (!update.isEmpty()) {
              IdeCompatibleUpdate compatibleUpdate = update.get(0);
              node.setExternalPluginId(compatibleUpdate.getExternalPluginId());
              node.setExternalUpdateId(compatibleUpdate.getExternalUpdateId());
            }

            PluginNode fullNode = marketplace.loadPluginDetails(node);
            if (fullNode != null) {
              loadAllPluginDetails(marketplace, node, fullNode);
              component.setInstalledPluginMarketplaceNode(fullNode);
            }
          }
        });
      }

      if (syncLoading) {
        showPluginImpl(component.getPluginDescriptor(), component.myUpdateDescriptor);
        PluginManagerUsageCollector.pluginCardOpened(component.getPluginDescriptor(), component.getGroup());
      }
    }
  }
private void showPlugin(@Nullable ListPluginComponent component, boolean multiSelection)