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
if (!getExpanded(parentItem) && getItemCount(parentItem) == 0) {
				
				if (isExpandable(parentItem, null, parentItem.getData())) {
					newItem(parentItem, SWT.NULL, -1);
				} else {
					
					tree.redraw();
				}
			}
		}
	}
	/**
	 * Removes the given elements from this viewer, whenever those elements
	 * appear as children of the given parent.
	 * 
	 * @param elements
	 *            the elements to remove
	 * @since 3.1
	 */
	protected void internalRemove(Object parent, Object[] elements) {
		CustomHashtable toRemove = new CustomHashtable(getComparer());
		for (int i = 0; i < elements.length; i++) {
			toRemove.put(elements[i], elements[i]);
		}
		
		
		CustomHashtable parentItems = new CustomHashtable(5);
		
		Widget[] parentItemArray = findItems(parent);
		for (int i = 0; i < parentItemArray.length; i++) {