Package org.eclipse.core.databinding.observable.set

Examples of org.eclipse.core.databinding.observable.set.IObservableSet


   */
  public static IObservableSet observeDetailSet(Realm realm,
      IObservableValue master, String propertyName, Class propertyType) {
    warnIfDifferentRealms(realm, master.getRealm());

    IObservableSet observableSet = MasterDetailObservables.detailSet(
        master, BeanProperties.set(propertyName, propertyType)
            .setFactory(realm), propertyType);
    return new BeanObservableSetDecorator(observableSet, BeanPropertyHelper
        .getValueTypePropertyDescriptor(master, propertyName));
  }
View Full Code Here


    }
    return super.observe(source);
  }

  public IObservableSet observe(Realm realm, Object source) {
    IObservableSet observable = super.observe(realm, source);
    if (source instanceof Viewer)
      return new ViewerObservableSetDecorator(observable, (Viewer) source);
    return observable;
  }
View Full Code Here

      validateTargetToModel();
    }
  }

  public void updateModelToTarget() {
    final IObservableSet modelSet = (IObservableSet) getModel();
    modelSet.getRealm().exec(new Runnable() {
      public void run() {
        SetDiff diff = Diffs.computeSetDiff(Collections.EMPTY_SET,
            modelSet);
        doUpdate(modelSet, (IObservableSet) getTarget(), diff,
            modelToTarget, true, true);
View Full Code Here

      }
    });
  }

  public void updateTargetToModel() {
    final IObservableSet targetSet = (IObservableSet) getTarget();
    targetSet.getRealm().exec(new Runnable() {
      public void run() {
        SetDiff diff = Diffs.computeSetDiff(Collections.EMPTY_SET,
            targetSet);
        doUpdate(targetSet, (IObservableSet) getModel(), diff,
            targetToModel, true, true);
View Full Code Here

   */
  public static IObservableSet observeDetailSet(Realm realm,
      IObservableValue master, String propertyName, Class propertyType) {
    BeansObservables.warnIfDifferentRealms(realm, master.getRealm());

    IObservableSet observableSet = MasterDetailObservables.detailSet(
        master, PojoProperties.set(propertyName, propertyType)
            .setFactory(realm), propertyType);
    return new BeanObservableSetDecorator(observableSet, BeanPropertyHelper
        .getValueTypePropertyDescriptor(master, propertyName));
  }
View Full Code Here

  public IObservableSet observe(Realm realm, Object source) {
    IElementComparer comparer = null;
    if (source instanceof StructuredViewer)
      comparer = ((StructuredViewer) source).getComparer();
    Set wrappedSet = ViewerElementSet.withComparer(comparer);
    IObservableSet observable = new CheckableCheckedElementsObservableSet(
        realm, wrappedSet, elementType, comparer, (ICheckable) source);
    if (source instanceof Viewer)
      observable = new ViewerObservableSetDecorator(observable,
          (Viewer) source);
    return observable;
View Full Code Here

TOP

Related Classes of org.eclipse.core.databinding.observable.set.IObservableSet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.