Bug 167204 [DataBinding] Ensure that getterCalled() is invoked correctly in WritableList
We need to clean up WritableList as its getterCalled() invocation is somewhat sporatic. Changes that need to be made: * setters should not invoke getterCalled(); this means all add(..) and remove(...) methods. * iterator() should invoke getterCalled() (ObservableList) * next() and hasNext() on the iterator should not invoke getterCalled() (ObservableList) The idea was previously that because add*(...) and remove*(...) returned a value then the state was retrieved thus getterCalled() should be invoked. But for the sake of simplicity these will be removed; we can always add them back later. But in removing the calls to getterCalled() we need to ensure that the current realm is still checked.
tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/list/AbstractObservableListTest.java
}
	public void testFireListChangeRealmChecks() throws Exception {
		RealmTester.exerciseCurrent(new Runnable() {
			public void run() {
				list.fireListChange(null);
			}
		});
	}
	static class AbstractObservableListStub extends AbstractObservableList {
		protected int doGetSize() {
			return 0;
		}
		public Object get(int arg0) {
			return null;
		}
		public Object getElementType() {
			return null;
		}
		protected void fireChange() {
			super.fireChange();
		}
		protected void fireStale() {
			super.fireStale();
		}
		protected void fireListChange(ListDiff diff) {
			super.fireListChange(diff);
		}
	}
}