Bug 198201 [DataBinding] Provide POJO observables
There have been quite a few requests on the newsgroup recently about trying to use POJOs and filling up logs with error messages about not being able to register property change event listeners. It would be nice to provide a cleaner solution than using the JavaBean support that we provide today.
tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/internal/databinding/internal/beans/JavaBeanObservableValueTest.java
public void testSetsValueInBean() throws Exception {
        String value = "value";
        assertNull(observableValue.getValue());
        observableValue.setValue(value);
        assertEquals("value", value, observableValue.getValue());
    }
	public void testGetObserved() throws Exception {
		assertEquals(bean, observableValue.getObserved());
	}
	public void testGetPropertyDescriptor() throws Exception {
    	assertEquals(propertyDescriptor, observableValue.getPropertyDescriptor());
	}
	public void testSetValueThrowsExceptionThrownByBean() throws Exception {
		ThrowsSetException temp = new ThrowsSetException();
		JavaBeanObservableValue observable = new JavaBeanObservableValue(Realm
				.getDefault(), temp,
				new PropertyDescriptor("value", ThrowsSetException.class));
		try {
			observable.setValue("");
			fail("exception should have been thrown");
		} catch (RuntimeException e) {	
			assertEquals(temp.thrownException, e.getCause());
		}
	}
	
	public void testGetValueThrowsExceptionThrownByBean() throws Exception {
		ThrowsGetException temp = new ThrowsGetException();
		JavaBeanObservableValue observable = new JavaBeanObservableValue(Realm
				.getDefault(), temp,
				new PropertyDescriptor("value", ThrowsGetException.class));