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/ColumnViewer.java
}
	/**
	 * Returns the number of columns contained in the receiver. If no columns
	 * were created by the programmer, this value is zero, despite the fact that
	 * visually, one column of items may be visible. This occurs when the
	 * programmer uses the column viewer like a list, adding elements but never
	 * creating a column.
	 *
	 * @return the number of columns
	 *
	 * @since 3.3
	 */
	protected abstract int doGetColumnCount();
	/**
	 * Returns the label provider associated with the column at the given index
	 * or <code>null</code> if no column with this index is known.
	 *
	 * @param columnIndex
	 *            the column index
	 * @return the label provider associated with the column or
	 *         <code>null</code> if no column with this index is known
	 *
	 * @since 3.3
	 */
	public CellLabelProvider getLabelProvider(int columnIndex) {
		ViewerColumn column = getViewerColumn(columnIndex);
		if (column != null) {
			return column.getLabelProvider();
		}
		return null;