org.eclipse.xtext.ui.editor.findrefs
Class ReferenceSearchViewSorter

java.lang.Object
  extended by org.eclipse.jface.viewers.ViewerComparator
      extended by org.eclipse.jface.viewers.ViewerSorter
          extended by org.eclipse.xtext.ui.editor.findrefs.ReferenceSearchViewSorter

public class ReferenceSearchViewSorter
extends org.eclipse.jface.viewers.ViewerSorter

Author:
koehnlein - Initial contribution and API

Field Summary
 
Fields inherited from class org.eclipse.jface.viewers.ViewerSorter
collator
 
Constructor Summary
ReferenceSearchViewSorter()
           
 
Method Summary
protected  java.lang.Integer _compare(IResourceDescription rd0, IResourceDescription rd1)
           
protected  java.lang.Integer _compare(java.lang.Object o0, java.lang.Object o1)
           
 int compare(org.eclipse.jface.viewers.Viewer viewer, java.lang.Object e1, java.lang.Object e2)
          Returns a negative, zero, or positive number depending on whether the first element is less than, equal to, or greater than the second element.
 
Methods inherited from class org.eclipse.jface.viewers.ViewerSorter
getCollator
 
Methods inherited from class org.eclipse.jface.viewers.ViewerComparator
category, getComparator, isSorterProperty, sort
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReferenceSearchViewSorter

public ReferenceSearchViewSorter()
Method Detail

compare

public int compare(org.eclipse.jface.viewers.Viewer viewer,
                   java.lang.Object e1,
                   java.lang.Object e2)
Description copied from class: org.eclipse.jface.viewers.ViewerComparator
Returns a negative, zero, or positive number depending on whether the first element is less than, equal to, or greater than the second element.

The default implementation of this method is based on comparing the elements' categories as computed by the category framework method. Elements within the same category are further subjected to a case insensitive compare of their label strings, either as computed by the content viewer's label provider, or their toString values in other cases. Subclasses may override.

Overrides:
compare in class org.eclipse.jface.viewers.ViewerComparator
Parameters:
viewer - the viewer
e1 - the first element
e2 - the second element
Returns:
a negative number if the first element is less than the second element; the value 0 if the first element is equal to the second element; and a positive number if the first element is greater than the second element

_compare

protected java.lang.Integer _compare(IResourceDescription rd0,
                                     IResourceDescription rd1)

_compare

protected java.lang.Integer _compare(java.lang.Object o0,
                                     java.lang.Object o1)