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

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

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

Sorts by raw timestamp of resource. This uses the file system timestamp so even if the resource is out of sync with the workspace it will sort to top when requested.


Field Summary
 
Fields inherited from class org.eclipse.jface.viewers.ViewerSorter
collator
 
Constructor Summary
TimestampSorter()
           
 
Method Summary
 int compare(org.eclipse.jface.viewers.Viewer viewer, java.lang.Object e1, java.lang.Object e2)
          This compare logic swaps the passed values in the return statement to sort from highest to lowest.
 
Methods inherited from class org.eclipse.jface.viewers.ViewerSorter
category, getCollator, isSorterProperty, sort
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimestampSorter

public TimestampSorter()
Method Detail

compare

public int compare(org.eclipse.jface.viewers.Viewer viewer,
                   java.lang.Object e1,
                   java.lang.Object e2)
This compare logic swaps the passed values in the return statement to sort from highest to lowest.

The string value passed back is the date in milliseconds.

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