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
* subtree rooted at the given element to the given level.
     * 
     * @param elementOrTreePath
     *           the element
     * @param level
     *           non-negative level, or <code>ALL_LEVELS</code> to expand all
     *           levels of the tree
     */
    public void expandToLevel(Object elementOrTreePath, int level) {
        Widget w = internalExpand(elementOrTreePath, true);
        if (w != null)
            internalExpandToLevel(w, level);
    }
    /**
     * Fires a tree collapsed event. Only listeners registered at the time this
     * method is called are notified.
     * 
     * @param event
     *           the tree expansion event
     * @see ITreeViewerListener#treeCollapsed
     */
    protected void fireTreeCollapsed(final TreeExpansionEvent event) {
        Object[] listeners = treeListeners.getListeners();
        for (int i = 0; i < listeners.length; ++i) {
            final ITreeViewerListener l = (ITreeViewerListener) listeners[i];
            SafeRunnable.run(new SafeRunnable() {
                public void run() {
                    l.treeCollapsed(event);
                }
            });