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
assertEquals(o2, settableValue1.getValue());
	}
	public void testBindingListeners() {
		final int[] calls = new int[] { 0, 0 };
		
		
		
		
		
		
		
		
		final int[] pipelinePositions = new int[] { 0, 1, 2, 3, 4, 0, 2, 4, 1,
				0, 1, 2, 0, 2, 4, 1 };
		settableValue1.setValue(o1);
		settableValue2.setValue(o2);
		Binding binding = dbc.bind(settableValue1, settableValue2, null);
		binding.addBindingEventListener(new BindingAdapter() {
			public ValidationError bindingEvent(BindingEvent e) {
				
				assertEquals("Unexpected pipeline position at call #"
						+ calls[0], pipelinePositions[calls[0]],
						e.pipelinePosition);
				calls[0]++;
				return null;
			}
		});
		binding.addBindingEventListener(new BindingAdapter() {
			public ValidationError bindingEvent(BindingEvent e) {
				calls[1]++;