Bug 84314 [Viewers] Need to allow mapping elements to multiple widgets/items
One of the projects I am working on is using an essentially graph structured dependancy model and we use TableTreeViewer for browsing (drilling down) through this graph. The nature of the model is such that the same model element can occur in multiple positions (paths) of the three. Current implementation of the TreeViewer and TableTreeViewer do not support such one-to-many mapping of model elements to widgets, leading to loads of unnecessary overhead to enshure that correct items will get updated. Suggestion: Element -> Item mapper should allow returning of more than one item per model element that is associated with this element.
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/TableViewer.java
* The table viewer implementation of this <code>Viewer</code> framework
	 * method ensures that the given label provider is an instance of either
	 * <code>ITableLabelProvider</code> or <code>ILabelProvider</code>. If
	 * it is an <code>ITableLabelProvider</code>, then it provides a separate
	 * label text and image for each column. If it is an
	 * <code>ILabelProvider</code>, then it provides only the label text and
	 * image for the first column, and any remaining columns are blank.
	 */
	public void setLabelProvider(IBaseLabelProvider labelProvider) {
		Assert.isTrue(labelProvider instanceof ITableLabelProvider
				|| labelProvider instanceof ILabelProvider);
		super.setLabelProvider(labelProvider);
		if(labelProvider instanceof ITableFontProvider || labelProvider instanceof ITableColorProvider)
			tableColorAndFont = new TableColorAndFontCollector(labelProvider);
		else
			tableColorAndFont = new TableColorAndFontNoOp();
				
	}
	
	/**
	 * <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>