private static void initPluginsListeners() {
    if (myUpdatesService == null) {
      myUpdatesService = PluginUpdatesService.connectWithUpdates(updateResult -> {
        if (updateResult == null) {
          newUpdatedPlugins(null);
          myCustomRepositoryPlugins = null;
          return;
        }
        if (!UpdateSettings.getInstance().isPluginsCheckNeeded()) {
          return;
        }
        newUpdatedPlugins(updateResult.getPluginUpdates().getAll());
        myCustomRepositoryPlugins = updateResult.getPluginNods();
      });
    }
    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);
        }
      });
    }
  }
private static void initPluginsListeners()