Bug 171132 [DataBinding] Incorrect interaction between observeText(field, FocusOut) and Binding.updateModelFromTarget
Build: RCP SDK 3.3M4, databinding plugins from CVS at 17-Jan-2007 Steps To Reproduce: Make a Text field, attach a Binding to it via SWTObservables.observeText(field, SWT.FocusOut). The binding must involve a targetValidator/domainValidator. Also, create a key listener that responds with Binding.updateModelFromTarget(). Then: 1. Tab into the text field. 2. Enter some legal value. 3. Tab out of it and tab back in. 4. Change the entry to an illegal value, do not tab out. 5. Execute on-demand validation (for example, I set up a KeyListener responding to F5 for this). The GUI shows a validation failure notice. 6. Change the value back to the legal value of Step 2. 7. Now tab out of the field. The field is not revalidated and the validation failure notice stays on. A JUnit test will be attached that exercises this scenario.
bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/TextObservableValue.java
/**
	 * {@link Text} widget that this is being observed.
	 */
	private final Text text;
	/**
	 * Flag to track when the model is updating the widget. When
	 * <code>true</code> the handlers for the SWT events should not process
	 * the event as this would cause an infinite loop.
	 */
	private boolean updating = false;
	/**
	 * SWT event that on firing this observable will fire change events to its
	 * listeners.
	 */
	private int updateEventType;
	/**
	 * Valid types for the {@link #updateEventType}.
	 */
	private static final int[] validUpdateEventTypes = new int[] { SWT.Modify,
			SWT.FocusOut, SWT.NONE };
	/**
	 * Last value set using doSetValue(), or null. This is maintained so that
	 * when entering text if the consumer were to press [Escape] the value can
	 * be reverted back to the last known externally-set value.
	 */
	private String bufferedValue;
	private Listener updateListener = new Listener() {
		public void handleEvent(Event event) {
			if (!updating) {
				String oldValue = bufferedValue;