Bug 181308 [Viewers] Add checked state provider to CheckBox*Viewer
It would be nice to have a provider (similar to the label or font or color providers) to determine the checked/grayed state of elements in a CheckBox*Viewer (either Table or Tree). This would generally simplify the programming model and give the developer better control over how the model objects are displayed in the viewer.
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/CheckboxTreeViewer.java
*
     * @param state <code>true</code> if the element should be checked,
     *  and <code>false</code> if it should be unchecked
     * @deprecated as this method only checks or unchecks visible items
     * is is recommended that {@link #setSubtreeChecked(Object, boolean)}
     * is used instead.
     * @see #setSubtreeChecked(Object, boolean) 
     *  
     *  @since 3.2
     */
	public void setAllChecked(boolean state) {
		setAllChecked(state,  getTree().getItems());
		
	}
	/**
	 * Set the checked state of the visible items and their children to state.
	 * @param state
	 * @param items
	 * @deprecated
	 * @see #setAllChecked(boolean)
	 */
	private void setAllChecked(boolean state, TreeItem[] items) {
		for (int i = 0; i < items.length; i++) {
			items[i].setChecked(state);			
			TreeItem[] children = items[i].getItems();
			setAllChecked(state, children);
		}
	}
}