Package org.eclipse.handly.ui.outline
Class LexicalSortContribution
java.lang.Object
org.eclipse.handly.ui.outline.OutlineContribution
org.eclipse.handly.ui.outline.OutlineSorterContribution
org.eclipse.handly.ui.outline.LexicalSortContribution
- All Implemented Interfaces:
IOutlineContribution
Contributes a lexical sorter, if the outline page supports lexical sorting.
The activation of the sorter is governed by the corresponding
preference.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.eclipse.jface.viewers.ViewerComparatorReturns a comparator that will be used when the sorter is active.protected IBooleanPreferenceReturns a boolean-valued preference that will control the activation of the sorter.Methods inherited from class org.eclipse.handly.ui.outline.OutlineSorterContribution
dispose, getDefaultComparator, initMethods inherited from class org.eclipse.handly.ui.outline.OutlineContribution
getOutlinePage
-
Constructor Details
-
LexicalSortContribution
public LexicalSortContribution()
-
-
Method Details
-
getPreference
Description copied from class:OutlineSorterContributionReturns a boolean-valued preference that will control the activation of the sorter. May returnnull, in which case this contribution will be effectively disabled. This method is called once, when this contribution is initializing.- Specified by:
getPreferencein classOutlineSorterContribution- Returns:
- the sorter preference, or
null
-
getComparator
protected org.eclipse.jface.viewers.ViewerComparator getComparator()Returns a comparator that will be used when the sorter is active. This method is called once, when this contribution is initializing.Default implementation returns a new
LabelComparator. Subclasses may override.- Specified by:
getComparatorin classOutlineSorterContribution- Returns:
- the comparator to use when the sorter is active
(not
null)
-