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.observeForeground(shell);
		assertNotNull(value);
		assertEquals(Color.class, value.getValueType());
	}
	public void testObserveBackground() throws Exception {
		ISWTObservableValue value = SWTObservables.observeBackground(shell);
		assertNotNull(value);
		assertEquals(Color.class, value.getValueType());
	}
	public void testObserveFont() throws Exception {
		ISWTObservableValue value = SWTObservables.observeFont(shell);
		assertNotNull(value);
		assertEquals(Font.class, value.getValueType());
	}
	public void testObserveSelectionOfSpinner() throws Exception {
		Spinner spinner = new Spinner(shell, SWT.NONE);
		ISWTObservableValue value = SWTObservables.observeSelection(spinner);
		assertNotNull(value);
		assertTrue(value instanceof SpinnerObservableValue);
		SpinnerObservableValue spinnerObservable = (SpinnerObservableValue) value;
		assertEquals(SWTProperties.SELECTION, spinnerObservable.getAttribute());
	}
	public void testObserveSelectionOfButton() throws Exception {
		Button button = new Button(shell, SWT.PUSH);
		ISWTObservableValue value = SWTObservables.observeSelection(button);
		assertNotNull(value);
		assertTrue(value instanceof ButtonObservableValue);
	}
	public void testObserveSelectionOfCombo() throws Exception {
		Combo combo = new Combo(shell, SWT.NONE);