boolean (@NotNull IdeaPluginDescriptorImpl descriptorImpl) { boolean needRestartForUninstall = true; try { PluginEnabler enabler = PluginEnabler.HEADLESS; if (enabler.isDisabled(descriptorImpl.getPluginId())) { enabler.enable(Collections.singletonList(descriptorImpl)); } descriptorImpl.setDeleted(true); needRestartForUninstall = PluginInstaller.prepareToUninstall(descriptorImpl); InstalledPluginsState.getInstance().onPluginUninstall(descriptorImpl, !needRestartForUninstall); if (!needRestartForUninstall) { myDynamicPluginsToUninstall.add(descriptorImpl); } } catch (IOException e) { LOG.error(e); } return needRestartForUninstall; }