Bug 209484 [Databinding] ObservableSetContentProvider does not update knownElements
Build ID: M20071023-1652 Steps To Reproduce: 1. Use a ObservableSetContentProvider in a databinding table 2. Evaluate the knownElements member 3. knownElements is always empty More information: We use a modified ObservableSetContentProvider to bind a table to a model. Moreover, we would like to register for all known Elements in this table using the member 'knownElements' of this class. However, this elements in this member are always empty. There seems to be a bug in method setInput(): 1.) The set of known elements is created in the constructor. 2.) In the inputChanged method (and then in setInput()) the readable set is set to a new value, but the knownElements remains unchanged.
bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableSetContentProvider.java
if (viewer instanceof TableViewer) {
				TableViewer tv = (TableViewer) viewer;
				tv.add(toAdd);
			} else if (viewer instanceof AbstractListViewer) {
				AbstractListViewer lv = (AbstractListViewer) viewer;
				lv.add(toAdd);
			}
			Object[] toRemove = removed.toArray();
			if (viewer instanceof TableViewer) {
				TableViewer tv = (TableViewer) viewer;
				tv.remove(toRemove);
			} else if (viewer instanceof AbstractListViewer) {
				AbstractListViewer lv = (AbstractListViewer) viewer;
				lv.remove(toRemove);
			}
		}
		knownElements.doFireDiff(Collections.EMPTY_SET, removed);
	}
	public Object[] getElements(Object inputElement) {
		return readableSet.toArray();
	}
	/**
	 * Returns the readableSet of elements known to this content provider. Items
	 * are added to this readableSet before being added to the viewer, and they
	 * are removed after being removed from the viewer. The readableSet is
	 * always updated after the viewer. This is intended for use by label
	 * providers, as it will always return the items that need labels.
	 * 
	 * @return readableSet of items that will need labels
	 */