com.ibm.jdg2e.view.files.viewer
Class NameSorter

java.lang.Object
  extended byorg.eclipse.jface.viewers.ViewerSorter
      extended bycom.ibm.jdg2e.view.files.viewer.NameSorter

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

Sorts by resource name, but files that start with a dot(.) are last.


Field Summary
 
Fields inherited from class org.eclipse.jface.viewers.ViewerSorter
collator
 
Constructor Summary
NameSorter()
           
 
Method Summary
 int category(java.lang.Object element)
          Identifies all files that start with a dot (.) in a separate category so they sort last.
 int compare(org.eclipse.jface.viewers.Viewer viewer, java.lang.Object e1, java.lang.Object e2)
          Resource name is appended with path to order duplicate names by folder/location.
 
Methods inherited from class org.eclipse.jface.viewers.ViewerSorter
getCollator, isSorterProperty, sort
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NameSorter

public NameSorter()
Method Detail

category

public int category(java.lang.Object element)
Identifies all files that start with a dot (.) in a separate category so they sort last.

See Also:
ViewerSorter.category(java.lang.Object)

compare

public int compare(org.eclipse.jface.viewers.Viewer viewer,
                   java.lang.Object e1,
                   java.lang.Object e2)
Resource name is appended with path to order duplicate names by folder/location.

See Also:
ViewerSorter.compare(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)