Bug 213848 [DataBinding] WritableSet behaves different to WritableList
Build ID: M20071023-1652 Steps To Reproduce: When I construct a WritableList from a List then the list is wrapped. When I do this with a Set then it is copied to a new Set and changes to the WritableSet are not reflected in the original Set anymore whiich is very nasty as one needs to copy back the writeableset. More information: public WritableSet(Realm realm, Collection c, Object elementType) { super(realm, new HashSet(c), elementType); this.elementType = elementType; } should have a constructor like public WritableSet(Realm realm, Set set, Object elementType) { super(realm, set, elementType); this.elementType = elementType; }
bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/WritableList.java
*     Gautam Saggar - bug 169529
 *     Brad Reynolds - bug 147515
 *     Matthew Hall - bug 208858, 213145
 *******************************************************************************/
package org.eclipse.core.databinding.observable.list;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import org.eclipse.core.databinding.observable.Diffs;
import org.eclipse.core.databinding.observable.Realm;
/**
 * Mutable observable list backed by an ArrayList.
 * 
 * <p>
 * This class is thread safe. All state accessing methods must be invoked from
 * the {@link Realm#isCurrent() current realm}. Methods for adding and removing
 * listeners may be invoked from any thread.
 * </p>
 * 
 * @since 1.0
 */
public class WritableList extends ObservableList {
	/**
	 * Creates an empty writable list in the default realm with a
	 * <code>null</code> element type.
	 * 
	 */
	public WritableList() {
		this(Realm.getDefault());