Bug 137442 [DataBinding] (C)ComboObservableValue should bind to selection index
3.2M6: I propose to extend (C)ComboObservableValue such that they could bind int.class values for pure selection changes of an otherwise immutable combo content. E.g. swtbinding allows such binding to an index holder and the class would attach as SelectionListener where it asks the combo for its selection index. Maybe the corresponding property should be assigned to SWTProperties.SELECTION_INDEX. Similar arguments could be given for corresponding extensions for SWT-List widgets.
bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/swt/TableObservableValue.java
private final Table table;
	private boolean updating = false;
	private int currentSelection;
	private String attribute;
	/**
	 * @param table
	 * @param attribute
	 */
	public TableObservableValue(Table table, String attribute) {
		super(table);
		this.table = table;
		this.attribute = attribute;
		
		currentSelection = table.getSelectionIndex();
		if (attribute.equals(SWTProperties.SELECTION)) {
			currentSelection = table.getSelectionIndex();
			table.addSelectionListener(new SelectionListener() {
				public void widgetSelected(SelectionEvent e) {
					if (!updating) {
						int newSelection = TableObservableValue.this.table
								.getSelectionIndex();
						fireValueChange(Diffs.createValueDiff(new Integer(
								currentSelection), new Integer(newSelection)));
						currentSelection = newSelection;
					}
				}
				public void widgetDefaultSelected(SelectionEvent e) {
					widgetSelected(e);