Package org.eclipse.ui.model
Class WorkbenchViewerComparator
java.lang.Object
org.eclipse.jface.viewers.ViewerComparator
org.eclipse.ui.model.WorkbenchViewerComparator
A viewer comparator that sorts elements with registered workbench adapters by
their text property. Note that capitalization differences are not considered
by this sorter, so a > B > c
- Since:
- 3.3
- See Also:
-
Constructor Summary
ConstructorDescriptionCreates a workbench viewer sorter using the default collator.WorkbenchViewerComparator
(Comparator comparator) Creates a workbench viewer sorter using the given collator. -
Method Summary
Modifier and TypeMethodDescriptionboolean
isSorterProperty
(Object element, String propertyId) Returns whether this viewer sorter would be affected by a change to the given property of the given element.Methods inherited from class org.eclipse.jface.viewers.ViewerComparator
category, compare, getComparator, sort
-
Constructor Details
-
WorkbenchViewerComparator
public WorkbenchViewerComparator()Creates a workbench viewer sorter using the default collator. -
WorkbenchViewerComparator
Creates a workbench viewer sorter using the given collator.- Parameters:
comparator
- the comparator to use to sort strings
-
-
Method Details
-
isSorterProperty
Description copied from class:ViewerComparator
Returns whether this viewer sorter would be affected by a change to the given property of the given element.The default implementation of this method returns
false
. Subclasses may reimplement.- Overrides:
isSorterProperty
in classViewerComparator
- Parameters:
element
- the elementpropertyId
- the property- Returns:
true
if the sorting would be affected, andfalse
if it would be unaffected
-