protected void showImplementations(@NotNull ImplementationViewSession session,
                                     boolean invokedFromEditor,
                                     boolean invokedByShortcut) {
    List<ImplementationViewElement> impls = session.getImplementationElements();
    if (impls.isEmpty()) return;

    Project project = session.getProject();
    triggerFeatureUsed(project);
    VirtualFile virtualFile = session.getFile();
    int index = 0;
    if (invokedFromEditor && virtualFile != null && impls.size() > 1) {
      final VirtualFile containingFile = impls.get(0).getContainingFile();
      if (virtualFile.equals(containingFile)) {
        final VirtualFile secondContainingFile = impls.get(1).getContainingFile();
        if (secondContainingFile != null && !secondContainingFile.equals(containingFile)) {
          index = 1;
        }
      }
    }

    ImplementationPopupManager.getInstance()
      .showImplementationsPopup(session, impls, index,
                                getPopupTitle(session), couldPinPopup(),
                                invokedFromEditor, invokedByShortcut,
                                lookupItemObject -> {
                                  updateElementImplementations(lookupItemObject, session);
                                  return Unit.INSTANCE;
                                });
  }
protected void showImplementations(@NotNull ImplementationViewSession session,
                                     boolean invokedFromEditor,
                                     boolean invokedByShortcut)