Bug 167450 [DataBinding] Get rid of bind support factory magic
I finally realized that we don't need that other magic factory. I'll move fillBindSpecDefaults() and the methods it calls (createConverter, createValidator etc) to a new class DefaultBindSpec. Clients who want default validators and converters created for them just create a DefaultBindSpec as opposed to a (rather empty) BindSpec. I will also move the early type checking into DefaultBindSpec to make it optional as well.
tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/PropertyScenarios.java
public void handleChange(IObservable source) {
                // Count 
                counter[0]++;
            }
        });
        Strg name = adventure.getName() + "Foo";
        enterText(t1, name);
        assertEquals(name, adventure.getName());
        assertEquals(name, t2.getText());
        assertTrue(counter[0] == 1);
        name = name + "Bar";
        uv.setValue(name);
        assertEquals(t1.getText(), adventure.getName());
        assertEquals(2, counter[0]);
    }
    public void testScenario15() {
        Text text = new Text(getComposite(), SWT.NONE);
        Account account = new Account();
        account.setExpiryDate(new Date());
        
        Bdg b = getDbc().bdValue(SWTObservables.observeText(text, SWT.Modify), BeansObservables.observeValue(account, "expiryDate"), null);
        Text errorText = new Text(getComposite(), SWT.NONE);
        
        getDbc().bdValue(SWTObservables.observeText(errorText, SWT.Modify), b.getValidationStatus(), new DefaultBdSpec().setUpdateModel(false));
        assertTrue(((IStatus)b.getValidationStatus().getValue()).isOK());
        enterText(text, "foo");
        assertFalse(((IStatus)b.getValidationStatus().getValue()).isOK());
    }
}