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
/*******************************************************************************
 * Copyright (c) 2004, 2006 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *     Tom Schindl <tom.schindl@bestsolution.at> - concept of ViewerRow
 *******************************************************************************/
package org.eclipse.jface.viewers;
import java.util.Iterator;
import java.util.List;
import org.eclipse.core.runtime.Assert;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.TreeEditor;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.events.MouseAdapter;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.TreeListener;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Item;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Tree;