Package org.eclipse.jface.viewers

Examples of org.eclipse.jface.viewers.IElementComparer


            super(id, parent, style);
            this.pydevPackageExplorer = pydevPackageExplorer;

            //We need to be able to compare actual resources and IWrappedResources
            //as if they were the same thing.
            setComparer(new IElementComparer() {

                public int hashCode(Object element) {
                    if (element instanceof IWrappedResource) {
                        IWrappedResource wrappedResource = (IWrappedResource) element;
                        return wrappedResource.getActualObject().hashCode();
View Full Code Here


    createCellEditors(table);

    tableViewer.setContentProvider(new ArrayContentProvider());
    tableViewer.setInput(specs);

    tableViewer.setComparer(new IElementComparer() {
      public boolean equals(Object a, Object b) {
        // need that as viewers are not designed to support 2 equals
        // object, while we have RefSpec#equals implemented
        return a == b;
      }
View Full Code Here

        if (reader != null)
          reader.release();
      }
    });

    treeViewer.setComparer(new IElementComparer() {
      // we need this to keep refresh() working while having custom
      // equals() in PushOperationResult
      public boolean equals(Object a, Object b) {
        return a == b;
      }
View Full Code Here

      }
    });
    btnExportProfile.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    btnExportProfile.setText("Export Profile ...");

    checkboxTreeViewer.setComparer(new IElementComparer() {

      @Override
      public boolean equals(Object a, Object b) {
        return a == b;
      }
View Full Code Here

   * 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

   * 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

TOP

Related Classes of org.eclipse.jface.viewers.IElementComparer

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.