Bug 156537 [Viewers] Virtual tree viewer does not populate with initial children
I20060830-1650 When a tree viewer is created with the SWT.Vitrual flag and uses an ILazyTreeContentProvider, the viewew does not populate with the initial children in the model. The method TreeViewer.createChildren(Widget) only updates existing items if the parent (root)element has been mapped to data, and does not query the content provider for the number of children it has. Attached is a sample plug-in showing the problem. The tree "model" looks like this: root one two three When the input is set to the viewer ("root") a call is made to "createChildren", but the content provider is never used.
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/AbstractTreeViewer.java
*/
	protected AbstractTreeViewer() {
		
	}
	/**
	 * Adds the given child elements to this viewer as children of the given
	 * parent element. If this viewer does not have a sorter, the elements are
	 * added at the end of the parent's list of children in the order given;
	 * otherwise, the elements are inserted at the appropriate positions.
	 * <p>
	 * This method should be called (by the content provider) when elements have
	 * been added to the model, in order to cause the viewer to accurately
	 * reflect the model. This method only affects the viewer, not the model.
	 * </p>
	 * 
	 * @param parentElementOrTreePath
	 *            the parent element
	 * @param childElements
	 *            the child elements to add
	 */
	public void add(Object parentElementOrTreePath, Object[] childElements) {
		Assert.isNotNull(parentElementOrTreePath);
		assertElementsNotNull(childElements);
		Widget[] widgets = internalFindItems(parentElementOrTreePath);
		
		if (widgets.length == 0) {
			return;
		}
		for (int i = 0; i < widgets.length; i++) {
			internalAdd(widgets[i], parentElementOrTreePath, childElements);