private void doScrollToSelectedTab(TablePassInfo data) {
    if (myTabs.isMouseInsideTabsArea()
        || data == null
        || data.lengths.isEmpty()
        || myTabs.isHideTabs()
        || !showPinnedTabsSeparately()) {
      return;
    }

    int offset = -myScrollOffset;
    for (TabInfo info : data.visibleInfos) {
      if (info.isPinned()) continue;
      final int length = data.lengths.get(info);
      if (info == myTabs.getSelectedInfo()) {
        if (offset < 0) {
          scroll(offset);
        }
        else {
          final int maxLength = data.moreRect.x;
          if (offset + length > maxLength) {
            // left side should be always visible
            if (length < maxLength) {
              scroll(offset + length - maxLength);
            }
            else {
              scroll(offset);
            }
          }
        }
        break;
      }
      offset += length;
    }
  }
private void doScrollToSelectedTab(TablePassInfo data)