public class ViewerSorter extends ViewerComparator
StructuredViewerto reorder the elements provided by its content provider.
compare method compares elements using two steps.
The first step uses the values returned from
By default, all elements are in the same category.
The second level is based on a case insensitive compare of the strings obtained
from the content viewer's label provider via
Subclasses may implement the
they may reimplement the
category method to provide
categorization; and they may override the
to provide a totally different way of sorting elements.
It is recommended to use
|Constructor and Description|
Creates a new viewer sorter, which uses the default collator to sort strings.
Creates a new viewer sorter, which uses the given collator to sort strings.
|Modifier and Type||Method and Description|
category, compare, getComparator, isSorterProperty, sort
protected Collator collator
public ViewerSorter(Collator collator)
collator- the collator to use to sort strings
public Collator getCollator()
Copyright (c) 2000, 2013 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.