void () { if (!myIsPluginAvailable) { myRestartButton.setVisible(false); myInstallButton.setVisible(false); myUpdateButton.setVisible(false); myGearButton.setVisible(false); if (myMultiTabs) { myEnableDisableButton.setVisible(false); } return; } boolean installedWithoutRestart = InstalledPluginsState.getInstance().wasInstalledWithoutRestart(myPlugin.getPluginId()); if (myMarketplace) { boolean installed = InstalledPluginsState.getInstance().wasInstalled(myPlugin.getPluginId()); myRestartButton.setVisible(installed); myInstallButton.setEnabled(PluginManagerCore.getPlugin(myPlugin.getPluginId()) == null && !installedWithoutRestart, IdeBundle.message("plugins.configurable.installed")); myInstallButton.setVisible(!installed); myUpdateButton.setVisible(false); if (myMultiTabs) { if (installed || myInstalledDescriptorForMarketplace == null) { myGearButton.setVisible(false); myEnableDisableButton.setVisible(false); } else { boolean[] state = getDeletedState(myInstalledDescriptorForMarketplace); boolean uninstalled = state[0]; boolean uninstalledWithoutRestart = state[1]; myInstallButton.setVisible(false); if (uninstalled) { if (uninstalledWithoutRestart) { myRestartButton.setVisible(false); myInstallButton.setVisible(true); myInstallButton.setEnabled(false, IdeBundle.message("plugins.configurable.uninstalled")); } else { myRestartButton.setVisible(true); } } boolean bundled = myInstalledDescriptorForMarketplace.isBundled(); myEnableDisableController.update(); myGearButton.setVisible(!uninstalled && !bundled); myEnableDisableButton.setVisible(bundled); myUpdateButton.setVisible(!uninstalled && myUpdateDescriptor != null && !installedWithoutRestart); updateEnableForNameAndIcon(); updateErrors(); } } else { myGearButton.setVisible(false); } } else { myInstallButton.setVisible(false); boolean[] state = getDeletedState(myPlugin); boolean uninstalled = state[0]; boolean uninstalledWithoutRestart = state[1]; if (uninstalled) { if (uninstalledWithoutRestart) { myRestartButton.setVisible(false); myInstallButton.setVisible(true); myInstallButton.setEnabled(false, IdeBundle.message("plugins.configurable.uninstalled")); } else { myRestartButton.setVisible(true); } myUpdateButton.setVisible(false); } else { myRestartButton.setVisible(false); updateEnabledForProject(); myUpdateButton.setVisible(myUpdateDescriptor != null && !installedWithoutRestart); } if (myEnableDisableController != null) { myEnableDisableController.update(); } if (myMultiTabs) { boolean bundled = myPlugin.isBundled(); myGearButton.setVisible(!uninstalled && !bundled); myEnableDisableButton.setVisible(bundled); } else { myGearButton.setVisible(!uninstalled); } updateEnableForNameAndIcon(); updateErrors(); } }