Examples of IElementComparer


Examples of org.eclipse.jface.viewers.IElementComparer

   * return <code>TRUE</code> for a reference compared with an Entity that has
   * the same ID and is belonging to the same Entity. At any time, it _must_ be
   * avoided to call add, update or refresh with passing in a Reference!
   */
  private IElementComparer getComparer() {
    return new IElementComparer() {
      public boolean equals(Object a, Object b) {

        /* Quickyly check this common case */
        if (a == b && a != null)
          return true;
View Full Code Here

Examples of org.eclipse.jface.viewers.IElementComparer

   * return <code>TRUE</code> for a reference compared with an Entity that has
   * the same ID and is belonging to the same Entity. At any time, it _must_ be
   * avoided to call add, update or refresh with passing in a Reference!
   */
  private IElementComparer getComparer() {
    return new IElementComparer() {
      public boolean equals(Object a, Object b) {

        /* Quickyly check this common case */
        if (a == b)
          return true;
View Full Code Here

Examples of org.eclipse.jface.viewers.IElementComparer

   * return <code>TRUE</code> for a reference compared with an Entity that has
   * the same ID and is belonging to the same Entity. At any time, it _must_ be
   * avoided to call add, update or refresh with passing in a Reference!
   */
  private IElementComparer getComparer() {
    return new IElementComparer() {
      public boolean equals(Object a, Object b) {

        /* Quickyly check this common case */
        if (a == b)
          return true;
View Full Code Here

Examples of org.eclipse.jface.viewers.IElementComparer

   * return <code>TRUE</code> for a reference compared with an Entity that has
   * the same ID and is belonging to the same Entity. At any time, it _must_ be
   * avoided to call add, update or refresh with passing in a Reference!
   */
  private IElementComparer getComparer() {
    return new IElementComparer() {
      public boolean equals(Object a, Object b) {

        /* Quickyly check this common case */
        if (a == b && a != null)
          return true;
View Full Code Here

Examples of org.eclipse.jface.viewers.IElementComparer

   * return <code>TRUE</code> for a reference compared with an Entity that has
   * the same ID and is belonging to the same Entity. At any time, it _must_ be
   * avoided to call add, update or refresh with passing in a Reference!
   */
  private IElementComparer getComparer() {
    return new IElementComparer() {
      public boolean equals(Object a, Object b) {

        /* Quickyly check this common case */
        if (a == b)
          return true;
View Full Code Here

Examples of org.eclipse.jface.viewers.IElementComparer

   * return <code>TRUE</code> for a reference compared with an Entity that has
   * the same ID and is belonging to the same Entity. At any time, it _must_ be
   * avoided to call add, update or refresh with passing in a Reference!
   */
  private IElementComparer getComparer() {
    return new IElementComparer() {
      public boolean equals(Object a, Object b) {

        /* Quickyly check this common case */
        if (a == b && a != null)
          return true;
View Full Code Here

Examples of org.eclipse.jface.viewers.IElementComparer

  }

  private boolean selectionContains(ITreeSelection selection, Object parent,
      Object element) {
    if (!selection.isEmpty()) {
      IElementComparer comparer = viewer.getComparer();
      TreePath[] paths = selection.getPaths();
      for (int i = 0; i < paths.length; i++) {
        TreePath path = paths[i];
        for (int j = 0; j < path.getSegmentCount() - 1; j++) {
          Object pathParent = path.getSegment(j);
View Full Code Here

Examples of org.eclipse.jface.viewers.IElementComparer

    viewerObservable = new WritableValue(SWTObservables.getRealm(display));
    viewerUpdater = null;

    elementSetFactory = new IObservableFactory() {
      public IObservable createObservable(Object target) {
        IElementComparer comparer = null;
        if (target instanceof StructuredViewer)
          comparer = ((StructuredViewer) target).getComparer();
        return ObservableViewerElementSet.withComparer(SWTObservables
            .getRealm(display), null, comparer);
      }
View Full Code Here

Examples of org.eclipse.jface.viewers.IElementComparer

    }
    return super.observe(source);
  }

  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);
View Full Code Here

Examples of org.eclipse.jface.viewers.IElementComparer

  }

  private boolean selectionContains(IStructuredSelection selection,
      Object element) {
    if (!selection.isEmpty()) {
      IElementComparer comparer = viewer.getComparer();
      for (Iterator iter = selection.iterator(); iter.hasNext();) {
        Object selectionElement = iter.next();
        if (comparer == null ? Util.equals(element, selectionElement)
            : comparer.equals(element, selectionElement)) {
          return true;
        }
      }
    }
    return false;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.