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
public IObservable createObservable(Object description) {
			return new DisposableObservable();
		}
	}
	public void testDisposeCalled() {
		Display display = new Display();
		Shell shell = new Shell(display);
		DataBindingContext dbc = DataBindingContext
				.createContext(new IObservableFactory[] { new DisposableObservableFactory() });
		registerContextToDispose(shell, dbc);
		DisposableObservable u = (DisposableObservable) dbc
				.createObservable(null);
		assertFalse("is not disposed", u.isDisposed());
		shell.dispose();
		display.dispose();
		assertTrue("is disposed", u.isDisposed());
	}
	private void registerContextToDispose(Shell shell,
			final DataBindingContext dbc) {
		shell.addDisposeListener(new DisposeListener() {
			public void widgetDisposed(DisposeEvent e) {
				dbc.dispose();
			}
		});
	}
	public void testBindValueModel() {
		Mocks.reset(observableValueRMock);
		observableValueRMock.addValueChangeListener(null);