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
/*******************************************************************************
 * Copyright (c) 2006 Brad Reynolds and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     Brad Reynolds - initial API and implementation
 ******************************************************************************/
package org.eclipse.jface.tests.databinding.observable.list;
import junit.framework.TestCase;
import org.eclipse.core.databinding.observable.Realm;
import org.eclipse.core.databinding.observable.list.AbstractObservableList;
import org.eclipse.core.databinding.observable.list.ListDiff;
import org.eclipse.jface.tests.databinding.util.RealmTester;
/**
 * @since 3.2
 */
public class AbstractObservableListTest extends TestCase {