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
}
	public void testObserveTextOfCLabel() throws Exception {
		CLabel label = new CLabel(shell, SWT.NONE);
		ISWTObservableValue value = SWTObservables.observeText(label);
		assertNotNull(label);
		assertTrue(value instanceof CLabelObservableValue);
	}
	public void testObserveTextOfCombo() throws Exception {
		Combo combo = new Combo(shell, SWT.NONE);
		ISWTObservableValue value = SWTObservables.observeText(combo);
		assertNotNull(value);
		assertTrue(value instanceof ComboObservableValue);
		ComboObservableValue comboObservable = (ComboObservableValue) value;
		assertEquals(SWTProperties.TEXT, comboObservable.getAttribute());
	}
	public void testObserveTextOfCCombo() throws Exception {
		CCombo combo = new CCombo(shell, SWT.NONE);
		ISWTObservableValue value = SWTObservables.observeText(combo);
		assertNotNull(value);
		assertTrue(value instanceof CComboObservableValue);
		CComboObservableValue ccomboObservable = (CComboObservableValue) value;
		assertEquals(SWTProperties.TEXT, ccomboObservable.getAttribute());
	}
	public void testObserveTextOfUnsupportedControl() throws Exception {
		Table table = new Table(shell, SWT.NONE);
		try {
			SWTObservables.observeText(table);
			fail("Exception should have been thrown");
		} catch (IllegalArgumentException e) {
		}