Bug 171415 [Viewers] Table viewer needs to clear label, image when items are reused
If an item is reused for a different element on a refresh, the table viewer needs to clear the label and image from the item being reused. This is necessary to communicate to the label provider that a new label is needed (i.e. the label provider may defer providing a label if decorators are not ready). This is what the tree viewer does. To see the problem, open the Java Browsing perspective and select a Java project. Then click between different packages. Notice that some of the labels in the Types list take a while to update. Opening one of these reveals that the label is showing the wrong text.
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/AbstractTableViewer.java
/**
	 * Adds the given element to this table viewer. If this viewer does not have
	 * a sorter, the element is added at the end; otherwise the element is
	 * inserted at the appropriate position.
	 * <p>
	 * This method should be called (by the content provider) when a single
	 * element has 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. Note that there is another method for efficiently processing
	 * the simultaneous addition of multiple elements.
	 * </p>
	 * 
	 * @param element
	 *            the element to add
	 */
	public void add(Object element) {
		add(new Object[] { element });
	}
	/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.jface.viewers.StructuredViewer#doFindInputItem(java.lang.Object)
	 */
	protected Widget doFindInputItem(Object element) {
		if (equals(element, getRoot())) {
			return getControl();
		}
		return null;
	}
	/*