@Override
  public void beforeActionPerformedUpdate(@NotNull AnActionEvent e) {
    if (isInInjectedContext()) {
      Editor editor = e.getData(CommonDataKeys.HOST_EDITOR);
      if (editor != null) {
        for (Caret caret : editor.getCaretModel().getAllCarets()) {
          if (EditorActionHandler.ensureInjectionUpToDate(caret)) {
            break;
          }
        }
      }
    }
    super.beforeActionPerformedUpdate(e);
  }
@Override
  public void beforeActionPerformedUpdate(@NotNull AnActionEvent e)