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.
tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/SWTObservablesTest.java
ISWTObservableValue value = SWTObservables.observeSelection(combo);
		assertNotNull(value);
		assertTrue(value instanceof ComboObservableValue);
		ComboObservableValue comboObservable = (ComboObservableValue) value;
		assertEquals(SWTProperties.SELECTION, comboObservable.getAttribute());
	}
	public void testObserveSelectionOfCCombo() throws Exception {
		CCombo combo = new CCombo(shell, SWT.NONE);
		ISWTObservableValue value = SWTObservables.observeSelection(combo);
		assertNotNull(value);
		assertTrue(value instanceof CComboObservableValue);
		CComboObservableValue ccomboObservable = (CComboObservableValue) value;
		assertEquals(SWTProperties.SELECTION, ccomboObservable.getAttribute());
	}
	public void testObserveSelectionOfList() throws Exception {
		List list = new List(shell, SWT.NONE);
		ISWTObservableValue value = SWTObservables.observeSelection(list);
		assertNotNull(value);
		assertTrue(value instanceof ListObservableValue);
	}
	
	public void testObserveSelectionOfScale() throws Exception {
		Scale scale = new Scale(shell, SWT.NONE);
		ISWTObservableValue value = SWTObservables.observeSelection(scale);
		assertNotNull(value);
		assertTrue(value instanceof ScaleObservableValue);
		
		ScaleObservableValue scaleObservable = (ScaleObservableValue) value;
		assertEquals(SWTProperties.SELECTION, scaleObservable.getAttribute());
	}