Bug 159940 [DataBinding] DataBindingContext shouldn't expose the bindings list as a mutable list
Currently in DataBindingContext getBindings() exposes the bindings observable list as a mutable observable list. I think we need to make this an unmodifiable list and also add a removeBinding(Binding binding) method to the API of DataBindingContext so that the DBC can remove itself from the binding when removed from the DBC. I'll create a patch soon.
tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/DatabindingContextTest.java
dbc = org.eclipse.jface.databinding.DataBindingContext.withDefaults();
        assertNotNull(dbc);
        assertNotNull("converter was not initialized with defaults", dbc.createConverter(String.class, String.class));
	}
    private void assertConverterType(BindSpec bs, int element, Class clazz, IConverter[] converters) {
		assertEquals("model2target[" + element + "] = identity", clazz, converters[element].getClass());
	}
    
    /**
     * Asserts that ValidationError is populated and change events are fired
     * when a Binding that is associated with a context is in error.
     * 
     * @throws Exception
     */
    public void testValidationError() throws Exception {
        WritableValue targetObservable = new WritableValue(String.class);
        WritableValue modelObservable = new WritableValue(String.class);
        final String errorMessage = "error";
        org.eclipse.jface.databinding.DataBindingContext dbc = org.eclipse.jface.databinding.DataBindingContext.withDefaults();
        ValueChangeCounter errorCounter = new ValueChangeCounter();
        ListChangeCounter errorsCounter = new ListChangeCounter();
        IObservableValue error = dbc.getValidationError();
        error.addValueChangeListener(errorCounter);
        assertNull(error.getValue());
        IObservableList errors = dbc.getValidationErrors();
        errors.addListChangeListener(errorsCounter);
        assertEquals(0, errors.size());
        IValidator validator = new IValidator() {
            public ValidationError isPartiallyValid(Object value) {
                return null;