protected void navigateToItems(@Nullable MouseEvent event) {
    List<Pair<PsiElement, Navigatable>> navigatables = new ArrayList<>();
    for (SmartPsiElementPointer<?> pointer : myPointers.getValue()) {
      ContainerUtil.addIfNotNull(navigatables, getNavigatable(pointer));
    }
    if (navigatables.size() == 1) {
      if (myNavigationHandler != null) {
        myNavigationHandler.navigate(event, navigatables.get(0).first);
      } else {
        navigatables.get(0).second.navigate(true);
      }
    }
    else if (event != null) {
      //noinspection unchecked
      PsiElementListCellRenderer<PsiElement> renderer = (PsiElementListCellRenderer<PsiElement>)myCellRenderer.compute();
      if (myTargetRenderer != null || DefaultPsiElementCellRenderer.class == renderer.getClass()) {
        PsiTargetNavigator<PsiElement> navigator = new PsiTargetNavigator<>(() -> getTargetElements());
        if (myTargetRenderer != null) {
          navigator.presentationProvider(myTargetRenderer.get());
        }
        navigator.navigate(new RelativePoint(event), myPopupTitle, myProject, element -> getElementProcessor(event).execute(element));
        return;
      }
      if (!ApplicationManager.getApplication().isUnitTestMode()) {
        LOG.error("Do not use PsiElementListCellRenderer: " + myCellRenderer + ". Use PsiTargetPresentationRenderer via NavigationGutterIconBuilder.setTargetRenderer()");
      }
      PsiElement[] elements = PsiUtilCore.toPsiElementArray(getTargetElements());
      JBPopup popup = NavigationUtil.getPsiElementPopup(elements, renderer, myPopupTitle, getElementProcessor(event));
      popup.show(new RelativePoint(event));
    }
  }
protected void navigateToItems(@Nullable MouseEvent event)