void (@NotNull IdeaPluginDescriptor descriptor, @NotNull Pair<PluginEnableDisableAction, PluginEnabledState> pair) { PluginId pluginId = descriptor.getPluginId(); Pair<PluginEnableDisableAction, PluginEnabledState> oldPair = myDiff.get(descriptor); PluginEnabledState oldState = oldPair != null ? oldPair.getSecond() : null; PluginEnabledState newState = pair.getSecond(); if (oldState != newState) { PluginEnabledState state = oldState != null ? oldState : getState(pluginId); myDiff.put(descriptor, Pair.create(pair.getFirst(), state)); } else { myDiff.remove(descriptor); } myErrorPluginsToDisable.remove(pluginId); if (newState.isEnabled() || descriptor.isEnabled()) { return; } if (PluginManagerCore.isIncompatible(descriptor) || isBrokenPlugin(descriptor) || hasProblematicDependencies(pluginId)) { myErrorPluginsToDisable.add(pluginId); } }