@Override
  public @Nullable JComponent createComponent() {
    myTabHeaderComponent = new TabbedPaneHeaderComponent(createGearActions(), index -> {
      myCardPanel.select(index, true);
      storeSelectionTab(index);

      String query = (index == MARKETPLACE_TAB ? myInstalledTab : myMarketplaceTab).getSearchQuery();
      (index == MARKETPLACE_TAB ? myMarketplaceTab : myInstalledTab).setSearchQuery(query);
    });

    myUpdateAll.setVisible(false);
    myUpdateAllBundled.setVisible(false);
    myUpdateCounter.setVisible(false);
    myUpdateCounterBundled.setVisible(false);

    myTabHeaderComponent.addTab(IdeBundle.message("plugin.manager.tab.marketplace"), null);
    myTabHeaderComponent.addTab(IdeBundle.message("plugin.manager.tab.installed"), myCountIcon);

    CustomPluginRepositoryService.getInstance().clearCache();
    myPluginUpdatesService = PluginUpdatesService.connectWithCounter(countValue -> {
      int count = countValue == null ? 0 : countValue;
      String text = Integer.toString(count);
      boolean visible = count > 0;

      String tooltip = PluginUpdatesService.getUpdatesTooltip();
      myTabHeaderComponent.setTabTooltip(INSTALLED_TAB, tooltip);

      myUpdateAll.setEnabled(true);
      myUpdateAllBundled.setEnabled(true);
      myUpdateAll.setVisible(visible && myBundledUpdateGroup.ui == null);
      myUpdateAllBundled.setVisible(visible);

      myUpdateCounter.setText(text);
      myUpdateCounter.setToolTipText(tooltip);
      myUpdateCounterBundled.setText(text);
      myUpdateCounterBundled.setToolTipText(tooltip);
      myUpdateCounter.setVisible(visible && myBundledUpdateGroup.ui == null);
      myUpdateCounterBundled.setVisible(visible);

      myCountIcon.setText(text);
      myTabHeaderComponent.update();
    });
    myPluginModel.setPluginUpdatesService(myPluginUpdatesService);

    UpdateChecker.updateDescriptorsForInstalledPlugins(InstalledPluginsState.getInstance());

    createMarketplaceTab();
    createInstalledTab();

    PluginManagerUsageCollector.sessionStarted();

    myCardPanel = new MultiPanel() {
      @Override
      protected JComponent create(Integer key) {
        if (key == MARKETPLACE_TAB) {
          return myMarketplaceTab.createPanel();
        }
        if (key == INSTALLED_TAB) {
          return myInstalledTab.createPanel();
        }
        return super.create(key);
      }
    };
    myCardPanel.setMinimumSize(new JBDimension(580, 380));
    myCardPanel.setPreferredSize(new JBDimension(800, 600));

    myTabHeaderComponent.setListener();

    int selectionTab = getStoredSelectionTab();
    myTabHeaderComponent.setSelection(selectionTab);
    myCardPanel.select(selectionTab, true);

    if (myLaterSearchQuery != null) {
      Runnable search = enableSearch(myLaterSearchQuery, myForceShowInstalledTabForTag);
      if (search != null) {
        ApplicationManager.getApplication().invokeLater(search, ModalityState.any());
      }
      myLaterSearchQuery = null;
      myForceShowInstalledTabForTag = false;
    }

    getPluginsViewCustomizer().processConfigurable(this);

    return myCardPanel;
  }
@Override
  public @Nullable JComponent createComponent()