void () { PluginId pluginId = myPlugin.getPluginId(); if (myMarketplace) { if (InstalledPluginsState.getInstance().wasInstalled(pluginId)) { myLayout.addButtonComponent(myRestartButton = new RestartButton(myPluginModel)); } else { IdeaPluginDescriptor installedDescriptorForMarketplace = PluginManagerCore.findPlugin(pluginId); boolean showInstall = installedDescriptorForMarketplace == null; myLayout.addButtonComponent(myInstallButton = createInstallButton()); myInstallButton.addActionListener( e -> myPluginModel.installOrUpdatePlugin(this, myPlugin, null, ModalityState.stateForComponent(myInstallButton))); myInstallButton.setEnabled(showInstall, IdeBundle.message("plugin.status.installed")); ColorButton.setWidth72(myInstallButton); if (PluginDetailsPageComponent.isMultiTabs()) { myInstalledDescriptorForMarketplace = installedDescriptorForMarketplace; myInstallButton.setVisible(showInstall); if (NewUiUtil.isDeleted(myInstalledDescriptorForMarketplace)) { if (InstalledPluginsState.getInstance().wasUninstalledWithoutRestart(pluginId)) { myInstallButton.setVisible(true); myInstallButton.setEnabled(false, IdeBundle.message("plugins.configurable.uninstalled")); myInstallButton.setPreferredSize(null); myAfterUpdate = true; } else { myLayout.addButtonComponent(myRestartButton = new RestartButton(myPluginModel)); myPluginModel.addUninstalled(myInstalledDescriptorForMarketplace); } } else { createEnableDisableButton(this::getInstalledDescriptorForMarketplace); myEnableDisableButton.setVisible(!showInstall); if (!showInstall) { updateEnabledStateUI(); } } } } } else { if (NewUiUtil.isDeleted(myPlugin)) { if (InstalledPluginsState.getInstance().wasUninstalledWithoutRestart(pluginId)) { myLayout.addButtonComponent(myInstallButton = createInstallButton()); myInstallButton.setVisible(true); myInstallButton.setEnabled(false, IdeBundle.message("plugins.configurable.uninstalled")); myAfterUpdate = true; } else { myLayout.addButtonComponent(myRestartButton = new RestartButton(myPluginModel)); myPluginModel.addUninstalled(myPlugin); } } else { InstalledPluginsState pluginsState = InstalledPluginsState.getInstance(); if (pluginsState.wasInstalled(pluginId) || pluginsState.wasUpdatedWithRestart(pluginId)) { myLayout.addButtonComponent(myRestartButton = new RestartButton(myPluginModel)); } else { createEnableDisableButton(this::getPluginDescriptor); updateEnabledStateUI(); } } myLayout.addButtonComponent(myAlignButton = new JComponent() { @Override public Dimension getPreferredSize() { return myEnableDisableButton instanceof JCheckBox ? myEnableDisableButton.getPreferredSize() : super.getPreferredSize(); } @Override public boolean isFocusable() { return false; } }); myAlignButton.setOpaque(false); } PluginsViewCustomizerKt.getListPluginComponentCustomizer().processCreateButtons(this); }