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
((Integer) target.getValue()).intValue());
		target.setValue(new Integer(9));
		assertEquals("model should now have target's value", 9,
				((Integer) model.getValue()).intValue());
		shell.dispose();
		display.dispose();
		assertTrue("dispose should have been called", disposeCalled[0]);
	}
	private class DisposableObservable extends AbstractObservableValue {
		protected Object computeValue() {
			return null;
		}
		public void setValue(Object value) {
		}
		public Object getValueType() {
			return Object.class;
		}
		protected Object doGetValue() {
			return null;
		}
		boolean isDisposed = false;
		public void dispose() {
			super.dispose();
			isDisposed = true;
		}
		public boolean isDisposed() {
			return isDisposed;
		}
	}
	private class DisposableObservableFactory implements IObservableFactory {