Bug 176882 [DataBinding] Create SWTObservables.observeEditable(...)
We need to provide an observable for the editable property of Text.
tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/SWTObservablesTest.java
public void testObserveMaxOfSpinner() throws Exception {
		Spinner spinner = new Spinner(shell, SWT.NONE);
		ISWTObservableValue value = SWTObservables.observeMax(spinner);
		assertNotNull(value);
		assertTrue(value instanceof SpinnerObservableValue);
		
		SpinnerObservableValue spinnerObservable = (SpinnerObservableValue) value;
		assertEquals(SWTProperties.MAX, spinnerObservable.getAttribute());
	}
	
	public void testObserveMaxOfScale() throws Exception {
		Scale scale = new Scale(shell, SWT.NONE);
		ISWTObservableValue value = SWTObservables.observeMax(scale);
		assertNotNull(value);
		assertTrue(value instanceof ScaleObservableValue);
		
		ScaleObservableValue scaleObservable = (ScaleObservableValue) value;
		assertEquals(SWTProperties.MAX, scaleObservable.getAttribute());
	}
	
	public void testObserveMaxOfUnsupportedControl() throws Exception {
		Text text = new Text(shell, SWT.NONE);
		try {
			SWTObservables.observeMax(text);
			fail("Exception should have been thrown");
		} catch (IllegalArgumentException e) {
		}
	}
}