Bug 92851 [Viewers] [api] protected field StructuredViewer.colorAndFontCollector
3.1 HEAD colorAndFontCollector protected ColorAndFontCollector colorAndFontCollector This read-write field was added as API in the 3.1 cycle. Exposing fields as API (other than public static final ones) is bad practice because a client can change the field and there's nothing the class can do to prevent or even track that change. All access to read-write field should be through accessor methods, including access from subclasses. Also, this field is missing an @since 3.1 tag.
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/StructuredViewer.java
* <li>discovers the old selection (via <code>getSelection</code>)</li>
	 * <li>runs the given runnable</li>
	 * <li>attempts to restore the old selection (using
	 * <code>setSelectionToWidget</code></li>
	 * <li>rediscovers the resulting selection (via <code>getSelection</code>)
	 * </li>
	 * <li>calls <code>handleInvalidSelection</code> if the selection did not
	 * take</li>
	 * <li>calls <code>postUpdateHook</code></li>
	 * </ul>
	 * </p>
	 * 
	 * @param updateCode
	 *            the code to run
	 */
	protected void preservingSelection(Runnable updateCode) {
		ISelection oldSelection = null;
		try {
			
			oldSelection = getSelection();
			inChange = restoreSelection = true;
			
			updateCode.run();
		} finally {
			inChange = false;
			
			if (restoreSelection)
				setSelectionToWidget(oldSelection, false);
			
			ISelection newSelection = getSelection();