@Override
      public void contentRemoved(final @NotNull ContentManagerEvent event) {
        final Content content = event.getContent();
        content.removePropertyChangeListener(RunnerContentUi.this);

        GridImpl grid = (GridImpl)findGridFor(content);
        if (grid != null) {
          grid.remove(content);
          if (grid.isEmpty()) {
            grid.processRemoveFromUi();
          }
          removeGridIfNeeded(grid);
        }
        updateTabsUI(false);
        fireContentClosed(content);
        ApplicationManager.getApplication().invokeLater(() -> {
          if (Disposer.isDisposed(content)) {
            AnAction[] actions = myViewActions.getChildren(ActionManager.getInstance());
            for (AnAction action : actions) {
              if (action instanceof ViewLayoutModificationAction && ((ViewLayoutModificationAction)action).getContent() == content) {
                myViewActions.remove(action);
                break;
              }
            }
          }
        });
      }
@Override
      public void contentRemoved(final @NotNull ContentManagerEvent event)