Bug 213166 [Viewers] Problems with OwnerDrawLabelProvider.setUpOwnerDraw
3.4 M4 To set up the owner draw callbacks for a viewer OwnerDrawLabelProvider.setUpOwnerDraw is offered. The problem of this is: a. there's no way to uninstall the callbacks. In our views we want to allow to enable and disable owner draw in the preferences b. from an API client perspective, it would be nicer if the label provider could install itself when installed. A good solution would be to add more life cycle to a label provider. CellLabelProvider.initialize(ColumnViewer, int column) There's already ILableProvider.dispose when a label provider is removed from a viewer.
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/OwnerDrawLabelProvider.java
* Return the item for the event
			 * 
			 * @param event
			 * @return Object
			 */
			private Object getElement(Event event) {
				return event.item.getData();
			}
			/**
			 * Return the label provider for the column.
			 * 
			 * @param viewer
			 * @param event
			 * @return CellLabelProvider
			 */
			private CellLabelProvider getLabelProvider(
					final ColumnViewer viewer, Event event) {
				return viewer.getViewerColumn(event.index).getLabelProvider();
			}
		});
	}
	/**
	 * Handle the erase event. The default implementation colors the background
	 * of selected areas with {@link SWT#COLOR_LIST_SELECTION} and foregrounds
	 * with {@link SWT#COLOR_LIST_SELECTION_TEXT}
	 * 
	 * @param event
	 *            the erase event
	 * @param element
	 *            the model object