private void onMouseClicked(@NotNull MouseEvent e) {
    boolean multiSelectMode = e.isShiftDown() || UIUtil.isControlKeyDown(e);
    boolean isPreviewDoubleClick = !isPreviewActive() || !hasPreviewProvider(myHeader.getSelectedTab()) || e.getClickCount() == 2;
    int selectedIndex = myResultsList.locationToIndex(e.getPoint());
    int listSize = myListModel.getSize();
    if (selectedIndex > 0 && selectedIndex < listSize
        && myListModel.getElementAt(selectedIndex) instanceof SearchListModel.ResultsNotificationElement) {
      if (prevSelectedIndex == (selectedIndex - 1 + listSize) % listSize) {
        myResultsList.setSelectedIndex(selectedIndex + 1);
        ScrollingUtil.ensureIndexIsVisible(myResultsList, selectedIndex + 1, 0);
      }
      else if (prevSelectedIndex == selectedIndex + 1) {
        int newIndex = (selectedIndex - 1 + listSize) % listSize;
        myResultsList.setSelectedIndex(newIndex);
        ScrollingUtil.ensureIndexIsVisible(myResultsList, newIndex, 0);
      }
      return;
    }
    if (e.getButton() == MouseEvent.BUTTON1 && !multiSelectMode && isPreviewDoubleClick) {
      e.consume();
      final int i = myResultsList.locationToIndex(e.getPoint());
      if (i > -1) {
        myResultsList.setSelectedIndex(i);
        elementsSelected(new int[]{i}, e.getModifiers());
      }
    }
  }
private void onMouseClicked(@NotNull MouseEvent e)