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
calls[0], calls[1]);
		assertEquals("binding events should be called at least once", true,
				calls[0] > 0);
	}
	public void testCollectionBindingListeners() {
		WritableList v1 = new WritableList();
		WritableList v2 = new WritableList();
		Binding binding = dbc.bind(v1, v2, null);
		final int[] calls = new int[] { 0 };
		binding.addBindingEventListener(new BindingAdapter() {
			public ValidationError bindingEvent(BindingEvent e) {
				calls[0]++;
				return null;
			}
		});
		v2.add(0, "test");
		assertBindingCalls(calls);
		v2.remove(0);
		assertBindingCalls(calls);
		v2.add(0, "test2");
		assertBindingCalls(calls);
		v2.set(0, "test3");
		assertBindingCalls(calls);
	}
	private void assertBindingCalls(final int[] calls) {
		assertTrue("Should have seen some binding event calls", calls[0] > 0);
		calls[0] = 0;
	}
	public void testCreateNestedObservableWithArrays() {