private static InspectionTreeNode prev(InspectionTreeNode node) {
      InspectionTreeNode parent = node.myParent;
      InspectionTreeNode sibling;
      if (parent != null) {
        InspectionTreeNode.Children siblings = parent.myChildren;
        assert siblings != null;
        int index = Arrays.binarySearch(siblings.myChildren, node, InspectionResultsViewComparator.INSTANCE);
        assert index >= 0;
        index--;
        if (index < 0) return parent; // if no sibling: go up.
        sibling = siblings.myChildren[index];
      }
      else if (TreeUtil.isCyclicScrollingAllowed()) {
        sibling = node;
      }
      else {
        return null;
      }
      InspectionTreeNode.Children children = sibling.myChildren;
      while (children != null && children.myChildren.length > 0) {
        // if sibling: get its last child (of last child (of last child))
        sibling = children.myChildren[children.myChildren.length - 1];
        children = sibling.myChildren;
      }
      return sibling;
    }
private static InspectionTreeNode prev(InspectionTreeNode node)