@Override
  public void update(@NotNull AnActionEvent e) {
    final XDebugSession session = DebuggerUIUtil.getSession(e);
    final PsiElement element = session == null ? null : myPositionResolver.getNearestElementToBreakpoint(session);
    final Presentation presentation = e.getPresentation();
    if (element == null) {
      presentation.setVisible(true);
      presentation.setEnabled(false);
    }
    else {
      ChainResolver.ChainStatus chainStatus = CHAIN_RESOLVER.tryFindChain(element);
      switch (chainStatus) {
        case LANGUAGE_NOT_SUPPORTED -> presentation.setEnabledAndVisible(false);
        case FOUND -> presentation.setEnabledAndVisible(true);
        case COMPUTING, NOT_FOUND -> {
          presentation.setVisible(true);
          presentation.setEnabled(false);
        }
      }
    }
  }
@Override
  public void update(@NotNull AnActionEvent e)