Bug 156544 [Viewers] Vitrual lazy tree viewer - refreshing a node does not make it expandable
I20060830-1650 Using a tree viewer with the SWT.Vitrual style and an ILazyTreeContentProvider. If a node in a tree has no children in an underlying model, and then has children added to that node, calling refresh no the corresponding element does not add a "+" to the tree node. The code that does not consult the content provider for an element's child count if a tree item already has data mapped to it. Attatched is a sample plug-in showing the problem. The model changes from: root one two three to: root one a b c two three ... but the content provider is not consulted when calling refresh on "one". To see the problem, open the sample view, and invoke "Update Model" action from the context menu.
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/TreeViewer.java
import org.eclipse.swt.widgets.TreeColumn;
import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.swt.widgets.Widget;
/**
 * A concrete viewer based on an SWT <code>Tree</code> control.
 * <p>
 * This class is not intended to be subclassed outside the viewer framework. It
 * is designed to be instantiated with a pre-existing SWT tree control and
 * configured with a domain-specific content provider, label provider, element
 * filter (optional), and element sorter (optional).
 * </p>
 * <p>
 * Content providers for tree viewers must implement either the
 * {@link ITreeContentProvider} interface or (as of 3.2) the
 * {@link ILazyTreeContentProvider} interface. If the content provider is an
 * <code>ILazyTreeContentProvider</code>, the underlying Tree must be created
 * using the {@link SWT#VIRTUAL} style bit, and the tree viewer will not support
 * sorting or filtering.
 * </p>
 */
public class TreeViewer extends AbstractTreeViewer {
	/**
	 * Internal tree viewer implementation.
	 */
	private TreeEditorImpl treeViewerImpl;
	/**
	 * This viewer's control.
	 */
	private Tree tree;
	/**