Project: com.ibm.rational.teamapi.scout

com.ibm.rational.teamapi.scout
Class NoTypeSorter

java.lang.Object
  extended by org.eclipse.jface.viewers.ViewerSorter
      extended by com.ibm.rational.teamapi.scout.NoTypeSorter

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

A ViewSorter that sorts the bound member list on the simple name of the child (as opposed to sorting on the label displayed in the tree view, which includes resource type information).


Field Summary
 
Fields inherited from class org.eclipse.jface.viewers.ViewerSorter
collator
 
Constructor Summary
NoTypeSorter()
           
 
Method Summary
 int compare(org.eclipse.jface.viewers.Viewer viewer, java.lang.Object e1, java.lang.Object e2)
           
protected  java.lang.String stripType(java.lang.String name, java.lang.Object obj)
          Strips the resource type from the head of the display name
 
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

NoTypeSorter

public NoTypeSorter()
Method Detail

compare

public int compare(org.eclipse.jface.viewers.Viewer viewer,
                   java.lang.Object e1,
                   java.lang.Object e2)
Overrides:
compare in class org.eclipse.jface.viewers.ViewerSorter

stripType

protected java.lang.String stripType(java.lang.String name,
                                     java.lang.Object obj)
Strips the resource type from the head of the display name

Parameters:
name - The element display name
obj - The ProxyElement from which the name was derived
Returns:
The element display name stripped of its resource type.

Generated Tue 3-Mar-2009 02:02 AM

Copyright © IBM 2009. All rights reserved.