@Override
    public void update(@NotNull AnActionEvent event) {
      FileEditorManagerEx manager = getManager(event);
      if (ActionPlaces.isPopupPlace(event.getPlace())) {
        event.getPresentation().setVisible(manager != null && manager.getWindowSplitCount() > 2);
      }
      else {
        event.getPresentation().setEnabled(manager != null && manager.isInSplitter());
      }
    }
@Override
    public void update(@NotNull AnActionEvent event)