private void updateElementImplementations(Object lookupItemObject, ImplementationViewSession session) {
    if (lookupItemObject instanceof PsiItemWithSimilarity<?> itemWithSimilarity)  {
      lookupItemObject = itemWithSimilarity.getValue();
    }
    if (lookupItemObject instanceof PSIPresentationBgRendererWrapper.PsiItemWithPresentation) {
      lookupItemObject = ((PSIPresentationBgRendererWrapper.PsiItemWithPresentation)lookupItemObject).getItem();
    }
    ImplementationViewSessionFactory currentFactory = session.getFactory();
    ImplementationViewSession newSession = createNewSession(currentFactory, session, lookupItemObject);
    if (newSession == null) {
      for (ImplementationViewSessionFactory factory : getSessionFactories()) {
        if (currentFactory == factory) continue;
        newSession = createNewSession(factory, session, lookupItemObject);
        if (newSession != null) break;
      }
    }
    if (newSession != null) {
      ensureValid(newSession, lookupItemObject);
      Disposer.dispose(session);
      showImplementations(newSession, false, false);
    }
  }
private void updateElementImplementations(Object lookupItemObject, ImplementationViewSession session)