void () { if (myUpdatesService == null) { myUpdatesService = PluginUpdatesService.connectWithUpdates(descriptors -> { if (ContainerUtil.isEmpty(descriptors)) { newUpdatedPlugins(null); myCustomRepositoryPlugins = null; return; } if (!UpdateSettings.getInstance().isPluginsCheckNeeded()) { return; } List<PluginDownloader> downloaders = new ArrayList<>(); try { for (IdeaPluginDescriptor descriptor : descriptors) { if (!UpdateChecker.isIgnored(descriptor)) { downloaders.add(PluginDownloader.createDownloader(descriptor)); } } } catch (IOException e) { PluginManagerCore.getLogger().error(e); } newUpdatedPlugins(downloaders); myCustomRepositoryPlugins = null; }); } if (myPluginStateListener == null) { PluginStateManager.addStateListener(myPluginStateListener = new PluginStateListener() { @Override public void install(@NotNull IdeaPluginDescriptor descriptor) { removePluginsUpdate(List.of(descriptor)); } @Override public void uninstall(@NotNull IdeaPluginDescriptor descriptor) { install(descriptor); } }); } }