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/TableViewer.java
/**
	 * <p>
	 * Sets a new selection for this viewer and optionally makes it visible. The
	 * TableViewer implmentation of this method is ineffecient for the
	 * ILazyContentProvider as lookup is done by indices rather than elements
	 * and may require population of the entire table in worse case.
	 * </p>
	 * <p>
	 * Use Table#setSelection(int[] indices) and Table#showSelection() if you
	 * wish to set selection more effeciently when using a ILazyContentProvider.
	 * </p>
	 * 
	 * @param selection
	 *            the new selection
	 * @param reveal
	 *            <code>true</code> if the selection is to be made visible,
	 *            and <code>false</code> otherwise
	 * @see Table#setSelection(int[])
	 * @see Table#showSelection()
	 */
	public void setSelection(ISelection selection, boolean reveal) {
		super.setSelection(selection, reveal);
	}
	
	protected ViewerRow getViewerRowFromItem(Widget item) {
		ViewerRow part = (ViewerRow) item.getData(ViewerRow.ROWPART_KEY);
		if (part == null) {
			part = new TableViewerRow(((TableItem) item));
		}
		return part;