Bug 127861 [DataBinding] Mark API provisional
bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/SelectionAwareUpdatableCollection.java
* @param object The new selection.
	 */
	public abstract void setSelectedObject(Object object);
	/* (non-Javadoc)
	 * @see org.eclipse.jface.databinding.IUpdatableCollection#setElements(java.util.List)
	 */
	public void setElements(List elements) {
		Object selectedObject = getSelectedObject();		
		super.setElements(elements);
		if (selectedObject != null) {
			boolean found = false;
			for (int i = 0; i < elements.size(); i++) {
				Object object = elements.get(i);
				if (selectedObject.equals(object)) {
					found = true;
					selectedObject = object;
					break;
				}
			}
			if (found) {
				setSelectedObject(selectedObject);
			} else {
				setSelectedObject(null);
			}
		}
	}
	
	
}