State (@NotNull State storedState) { Map<String, String> pluginIdToVersion = new HashMap<>(storedState.pluginIdToVersion.size()); for (String pluginIdString : storedState.pluginIdToVersion.keySet()) { PluginId pluginId = PluginId.findId(pluginIdString); IdeaPluginDescriptor plugin = pluginId == null ? null : PluginManager.getInstance().findEnabledPlugin(pluginId); if (plugin != null) { pluginIdToVersion.put(pluginIdString, storedState.pluginIdToVersion.get(pluginIdString)); } } return new State(pluginIdToVersion); }