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/ContentViewer.java
return labelProvider;
    }
    /**
     * Handles a dispose event on this viewer's control.
     * <p>
     * The <code>ContentViewer</code> implementation of this method disposes of this
     * viewer's label provider and content provider (if it has one).
     * Subclasses should override this method to perform any additional
     * cleanup of resources; however, overriding methods must invoke
     * <code>super.handleDispose</code>.
     * </p>
     *
     * @param event a dispose event
     */
    protected void handleDispose(DisposeEvent event) {
        if (contentProvider != null) {
            contentProvider.inputChanged(this, getInput(), null);
            contentProvider.dispose();
            contentProvider = null;
        }
        if (labelProvider != null) {
            labelProvider.removeListener(labelProviderListener);
            labelProvider.dispose();
            labelProvider = null;
        }
        input = null;
    }
    /**
     * Handles a label provider changed event.
     * <p>