Bug 174555 [DataBinding] Run validation on binding construction
When a binding is created the assumption is that the UI is synchronized with the model. This means that the UI should reflect the state of the model's validity as well. In order to ensure that the UI reflects the model's validity the consumer needs to force a copy to model on instantiation of every binding. We need to remove this requirement.
tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/provisional/viewers/SelectionObservableValueTest.java
public void testSetValue() throws Exception {
        Shell shell = new Shell();
        ListViewer viewer = new ListViewer(shell);
        String[] items = new String[] {"1", "2", "3"};
        viewer.setContentProvider(new ArrayContentProvider());
        viewer.setInput(items);
        
        IObservableValue observable = ViewersObservables.observeSingleSelection(viewer);
        ValueChangeListener listener = new ValueChangeListener();
        observable.addValueChangeListener(listener);
        
        assertNull(observable.getValue());
        assertEquals(StructuredSelection.EMPTY, viewer.getSelection());
        assertEquals(0, listener.count);
        
        observable.setValue(items[0]);
        assertEquals("observable value", items[0], observable.getValue());
        assertEquals("viewer selection", items[0], ((StructuredSelection) viewer.getSelection()).getFirstElement());
        assertEquals("value change event", 1, listener.count);
        
        observable.setValue(items[0]);
        assertEquals("value did not change, event should not have fired", 1, listener.count);
        
        observable.setValue(null);
        assertNull(observable.getValue());
        assertEquals("viewer selection should be empty", StructuredSelection.EMPTY, viewer.getSelection());
        assertEquals("value change event did not fire", 2, listener.count);
    }
    
    private static class ValueChangeListener implements IValueChangeListener {