Bug 205248 [Databinding] Observables on Text with FOCUS_OUT event incorrectly notify with no change
If you get an observable on a Text for the FOCUS_OUT event, the model is updated every time, even if there is no change in the value. The observable should not trigger a model change if the Text value is the same as the model value.
bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/TextObservableValue.java
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Text;
/**
 * {@link IObservable} implementation that wraps a {@link Text} widget. The time
 * at which listeners should be notified about changes to the text is specified
 * on construction.
 * 
 * <dl>
 * <dt>Events:</dt>
 * <dd> If the update event type (specified on construction) is
 * <code>SWT.Modify</code> a value change event will be fired on every key
 * stroke. If the update event type is <code>SWT.FocusOut</code> a value
 * change event will be fired on focus out. When in either mode if the user is
 * entering text and presses [Escape] the value will be reverted back to the
 * last value set using doSetValue(). Regardless of the update event type a
 * value changing event will fire on verify to enable vetoing of changes.</dd>
 * </dl>
 * 
 * @since 1.0
 */
public class TextObservableValue extends AbstractSWTVetoableValue {
	/**
	 * {@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.
	 */