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
} else {
			path = null;
		}
		return path;
	}
	/**
	 * Compare the two elements using the given sorter. If the
	 * sorter is a {@link TreePathViewerSorter}, the provided
	 * tree path will be used. If the tree path is null and the
	 * sorter is a tree path sorter, then the elements are root elements
	 * @param sorter the sorter
	 * @param parentPath the path of the elements' parent
	 * @param e1 the first element
	 * @param e2 the seocnd element
	 * @return the result of comparing the two elements
	 */
	private int internalCompare(ViewerSorter sorter, TreePath parentPath, Object e1, Object e2) {
		if (sorter instanceof TreePathViewerSorter) {
			TreePathViewerSorter tpvs = (TreePathViewerSorter) sorter;
			return tpvs.compare(this, parentPath, e1, e2);
		}
		return sorter.compare(this, e1, e2);
	}
	
	/* (non-Javadoc)
	 * @see org.eclipse.jface.viewers.StructuredViewer#getSortedChildren(java.lang.Object)
	 */
	protected Object[] getSortedChildren(Object parentElementOrTreePath) {
		Object[] result =  getFilteredChildren(parentElementOrTreePath);
		ViewerSorter sorter = getSorter();