private void handleQuery(@NotNull String query) {
    if (isProgressMode()) {
      loading(true);

      AtomicBoolean runQuery = myRunQuery = new AtomicBoolean(true);
      PluginsGroup group = myGroup;

      ApplicationManager.getApplication().executeOnPooledThread(() -> {
        handleQuery(query, group);

        ApplicationManager.getApplication().invokeLater(() -> {
          assert SwingUtilities.isEventDispatchThread();

          if (!runQuery.get()) {
            return;
          }
          myRunQuery = null;

          loading(false);

          if (!myGroup.descriptors.isEmpty()) {
            myGroup.titleWithCount();
            try {
              PluginLogo.startBatchMode();
              myPanel.addLazyGroup(myGroup, myVerticalScrollBar, 100, this::fullRepaint);
            }
            finally {
              PluginLogo.endBatchMode();
            }
          }

          announceSearchResultsWithDelay();
          myPanel.initialSelection(false);
          runPostFillGroupCallback();
          fullRepaint();
        }, ModalityState.any());
      });
    }
    else {
      handleQuery(query, myGroup);

      if (!myGroup.descriptors.isEmpty()) {
        myPanel.addGroup(myGroup);
        myGroup.titleWithCount();
        myPanel.initialSelection(false);
      }

      announceSearchResultsWithDelay();
      runPostFillGroupCallback();
      fullRepaint();
    }
  }
private void handleQuery(@NotNull String query)