private void removeGridIfNeeded(GridImpl grid) {
    if (grid.isEmpty()) {
      tabs.removeTab(tabs.findInfo(grid));
      myMinimizedButtonsPlaceholder.remove(grid);
      myCommonActionsPlaceholder.remove(grid);
      myContextActions.remove(grid);
      Disposer.dispose(grid);
    }
  }
private void removeGridIfNeeded(GridImpl grid)