Bug 111631 [Viewers] TreeViewer needs more TableViewer API
As the TreeViewer is meant to replace the TableTreeViewer we need to add some of the API that the TableViewer had to it so that it can be used like a table. public void insert(Object element, int position) public void add(Object[] objects) Both need to be added.
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/AbstractTreeViewer.java
Object data = items[mid].getData();
            int compare = internalCompare(sorter, parentPath, data, element);
            if (compare == 0) {
                return mid;
            }
            if (compare < 0)
                min = mid + 1;
            else
                max = mid - 1;
	        }
	   return min;
	    
			
	}
	/**
     * Returns the index where the item should be inserted. It uses sorter to
     * determine the correct position, if sorter is not assigned, returns the
     * index of the element after the last.
     * 
     * @param parent The parent widget
     * @param sorter The sorter to use.
     * @param startIndex
     *            the start index to start search for position from this allows
     *            optimising search for multiple elements that are sorted
     *            themself.
     * @param element
     *            element to find position for.
     * @param currentSize
     * 			the current size of the collection
     * @return the index to use when inserting the element.