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
public IObservableSet getKnownElements() {
		return knownElements;
	}
	public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
		this.viewer = viewer;
		if (!(viewer instanceof TableViewer || viewer instanceof AbstractListViewer)) {
			
			Class abstractTableViewerClass = null;
			try {
				abstractTableViewerClass = Class.forName("org.eclipse.jface.viewers.AbstractTableViewer"); 
			} catch(Exception ex) {
				
			}
			if (abstractTableViewerClass == null || !abstractTableViewerClass.isInstance(viewer)) {
				throw new IllegalArgumentException(
					"This content provider only works with (Abstract)TableViewer or AbstractListViewer"); 
			}
		}
		if (newInput != null && !(newInput instanceof IObservableSet)) {
			throw new IllegalArgumentException(
					"This content provider only works with input of type IReadableSet"); 
		}
		setInput((IObservableSet) newInput);
	}
	private boolean isDisposed() {
		return viewer.getControl() == null || viewer.getControl().isDisposed();
	}
	private void setInput(IObservableSet newSet) {
		boolean updateViewer = true;
		if (newSet == null) {