private void sortByName ( ) { this . sresList . setComparator ( new ViewerComparator ( ) { @ Override public int compare ( Viewer viewer , Object e1 , Object e2 ) { if ( ( e1 instanceof ISREInstall ) && ( e2 instanceof ISREInstall ) ) { final ISREInstall left = ( ISREInstall ) e1 ; final ISREInstall right = ( ISREInstall ) e2 ; return left . getName ( ) . compareToIgnoreCase ( right . getName ( ) ) ; } return super . compare ( viewer , e1 , e2 ) ; } @ Override public boolean isSorterProperty ( Object element , String property ) { return true ; } } ) ; this . sortColumn = Column . NAME ; }
Sorts by SRE name .