Example usage for org.eclipse.jface.databinding.conformance.util ChangeEventTracker observe

List of usage examples for org.eclipse.jface.databinding.conformance.util ChangeEventTracker observe

Introduction

In this page you can find the example usage for org.eclipse.jface.databinding.conformance.util ChangeEventTracker observe.

Prototype

public static ChangeEventTracker observe(IObservable observable) 

Source Link

Document

Convenience method to register a new listener.

Usage

From source file:org.eclipse.core.tests.databinding.beans.PojoObservablesTest.java

License:Open Source License

public void testObserveValue_DoesNotAttachListeners() throws Exception {
    IObservableValue value = PojoObservables.observeValue(pojo, propertyName);

    ChangeEventTracker.observe(value);
    assertFalse(pojo.hasListeners(propertyName));
}

From source file:org.eclipse.core.tests.databinding.beans.PojoObservablesTest.java

License:Open Source License

public void testObservableMap_DoesNotAttachListeners() throws Exception {
    IObservableSet set = new WritableSet();
    set.add(pojo);/*from   ww w.ja  v a 2  s.  c o  m*/

    IObservableMap map = PojoObservables.observeMap(set, Bean.class, propertyName);
    assertFalse(pojo.hasListeners(propertyName));
    ChangeEventTracker.observe(map);
    assertFalse(pojo.hasListeners(propertyName));
}

From source file:org.eclipse.core.tests.databinding.beans.PojoObservablesTest.java

License:Open Source License

public void testObserveListWithElementType_DoesNotAttachListeners() throws Exception {
    IObservableList observable = PojoObservables.observeList(Realm.getDefault(), pojo, "list", String.class);
    assertFalse(pojo.hasListeners("list"));
    ChangeEventTracker.observe(observable);
    assertFalse(pojo.hasListeners("list"));
}

From source file:org.eclipse.core.tests.databinding.beans.PojoObservablesTest.java

License:Open Source License

public void testObserveList_DoesNotAttachListeners() throws Exception {
    IObservableList observable = PojoObservables.observeList(Realm.getDefault(), pojo, "list");
    assertFalse(pojo.hasListeners("list"));
    ChangeEventTracker.observe(observable);
    assertFalse(pojo.hasListeners("list"));
}

From source file:org.eclipse.core.tests.databinding.beans.PojoObservablesTest.java

License:Open Source License

public void testObserveSetWithElementType_DoesNotAttachListeners() throws Exception {
    IObservableSet observable = PojoObservables.observeSet(Realm.getDefault(), pojo, "set", String.class);
    assertFalse(pojo.hasListeners("set"));
    ChangeEventTracker.observe(observable);
    assertFalse(pojo.hasListeners("set"));
}

From source file:org.eclipse.core.tests.databinding.beans.PojoObservablesTest.java

License:Open Source License

public void testObserveSet_DoesNotAttachListeners() throws Exception {
    IObservableSet observable = PojoObservables.observeSet(Realm.getDefault(), pojo, "set");
    assertFalse(pojo.hasListeners("set"));
    ChangeEventTracker.observe(observable);
    assertFalse(pojo.hasListeners("set"));
}

From source file:org.eclipse.core.tests.databinding.beans.PojoObservablesTest.java

License:Open Source License

public void testValueFactory_DoesNotAttachListeners() throws Exception {
    IObservableFactory factory = PojoObservables.valueFactory(Realm.getDefault(), "value");
    IObservableValue observable = (IObservableValue) factory.createObservable(pojo);

    assertFalse(pojo.hasListeners("value"));
    ChangeEventTracker.observe(observable);
    assertFalse(pojo.hasListeners("value"));
}

From source file:org.eclipse.core.tests.databinding.beans.PojoObservablesTest.java

License:Open Source License

public void testListFactory_DoesNotAttachListeners() throws Exception {
    IObservableFactory factory = PojoObservables.listFactory(Realm.getDefault(), "list", String.class);
    IObservableList observable = (IObservableList) factory.createObservable(pojo);

    assertFalse(pojo.hasListeners("value"));
    ChangeEventTracker.observe(observable);
    assertFalse(pojo.hasListeners("value"));
}

From source file:org.eclipse.core.tests.databinding.beans.PojoObservablesTest.java

License:Open Source License

public void testSetFactory_DoesNotAttachListeners() throws Exception {
    IObservableFactory factory = PojoObservables.setFactory(Realm.getDefault(), propertyName);
    IObservableSet observable = (IObservableSet) factory.createObservable(pojo);

    assertFalse(pojo.hasListeners("set"));
    ChangeEventTracker.observe(observable);
    assertFalse(pojo.hasListeners("set"));
}

From source file:org.eclipse.core.tests.databinding.beans.PojoObservablesTest.java

License:Open Source License

public void testSetFactoryWithElementType_DoesNotAttachListeners() throws Exception {
    IObservableFactory factory = PojoObservables.setFactory(Realm.getDefault(), propertyName, String.class);
    IObservableSet observable = (IObservableSet) factory.createObservable(pojo);

    assertFalse(pojo.hasListeners("set"));
    ChangeEventTracker.observe(observable);
    assertFalse(pojo.hasListeners("set"));
}