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
handleTreeCollapse(event);
            }
        });
    }
    /*
     * (non-Javadoc) Method declared on StructuredViewer. Builds the initial
     * tree and handles the automatic expand feature.
     */
    protected void inputChanged(Object input, Object oldInput) {
        preservingSelection(new Runnable() {
            public void run() {
                Control tree = getControl();
                boolean useRedraw = true;
                
                
                if (useRedraw)
                    tree.setRedraw(false);
                removeAll(tree);
                tree.setData(getRoot());
                createChildren(tree);
                internalExpandToLevel(tree, expandToLevel);
                if (useRedraw)
                    tree.setRedraw(true);
            }
        });
    }
    /**
     * Recursively collapses the subtree rooted at the given widget to the
     * given level.
     * <p>