public void setUpdateDescriptor(@Nullable IdeaPluginDescriptor descriptor) {
    if (myMarketplace && myInstalledDescriptorForMarketplace == null) {
      return;
    }
    if (myUpdateDescriptor == null && descriptor == null) {
      return;
    }
    if (myIndicator != null || isRestartEnabled()) {
      return;
    }

    myUpdateDescriptor = descriptor;

    IdeaPluginDescriptor plugin = getDescriptorForActions();

    if (descriptor == null) {
      if (myVersion != null) {
        myVersion.setText(plugin.getVersion());
      }
      if (myUpdateLicensePanel != null) {
        myLayout.removeLineComponent(myUpdateLicensePanel);
        myUpdateLicensePanel = null;
      }
      if (myUpdateButton != null) {
        myUpdateButton.setVisible(false);
      }
      if (myAlignButton != null) {
        myAlignButton.setVisible(false);
      }
    }
    else {
      if (myVersion != null) {
        myVersion.setText(NewUiUtil.getVersion(plugin, descriptor));
      }
      if (plugin.getProductCode() == null && descriptor.getProductCode() != null &&
          !plugin.isBundled() && !LicensePanel.isEA2Product(descriptor.getProductCode())) {
        if (myUpdateLicensePanel == null) {
          myLayout.addLineComponent(myUpdateLicensePanel = new LicensePanel(true));
          myUpdateLicensePanel.setBorder(JBUI.Borders.emptyTop(3));
          myUpdateLicensePanel.setVisible(myErrorPanel == null);
          if (myEventHandler != null) {
            myEventHandler.addAll(myUpdateLicensePanel);
          }
        }

        myUpdateLicensePanel.setText(IdeBundle.message("label.next.plugin.version.is"), true, false);
        myUpdateLicensePanel.showBuyPlugin(() -> myUpdateDescriptor, true);
        myUpdateLicensePanel.setVisible(true);
      }
      if (myUpdateButton == null) {
        myLayout.addButtonComponent(myUpdateButton = new UpdateButton(), 0);
        myUpdateButton.addActionListener(
          e -> myPluginModel.installOrUpdatePlugin(this, plugin, myUpdateDescriptor, ModalityState.stateForComponent(myUpdateButton)));
      }
      else {
        myUpdateButton.setEnabled(true);
        myUpdateButton.setVisible(true);
      }
      if (myAlignButton != null) {
        myAlignButton.setVisible(myEnableDisableButton != null && !myEnableDisableButton.isVisible());
      }
    }

    doLayout();
  }
public void setUpdateDescriptor(@Nullable IdeaPluginDescriptor descriptor)