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
Widget parentItem = parentItemArray[i];
			if (parentItem instanceof Item) {
				parentItems.put(parentItem, parentItem);
			}
			
			Item[] children = getChildren(parentItem);
			for (int j = 0; j < children.length; j++) {
				Item child = children[j];
				Object data = child.getData();
				if (data != null && toRemove.containsKey(data)) {
					disassociate(child);
					child.dispose();
				}
			}
		}
		internalReconcileParentItems(parentItems);
	}
	/**
	 * Sets the expanded state of all items to correspond to the given set of
	 * expanded elements.
	 * 
	 * @param expandedElements
	 *            the set (element type: <code>Object</code>) of elements
	 *            which are expanded
	 * @param widget
	 *            the widget
	 */
	private void internalSetExpanded(CustomHashtable expandedElements,
			Widget widget) {
		Item[] items = getChildren(widget);