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

      public class LexicalSortContribution
      extends OutlineSorterContribution

  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
    Constructor and Description
    `LexicalSortContribution()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected org.eclipse.jface.viewers.ViewerComparator` | `getComparator()` Returns a comparator that will be used when the sorter is active.
    `protected IBooleanPreference` | `getPreference()` Returns a boolean-valued preference that will control the activation of the sorter.

    - ### Methods inherited from class org.eclipse.handly.ui.outline.OutlineSorterContribution

      `dispose, getDefaultComparator, init`

    - ### Methods inherited from class org.eclipse.handly.ui.outline.OutlineContribution

      `getOutlinePage`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### LexicalSortContribution

          public LexicalSortContribution()

  - ### Method Detail

    - #### getPreference

          protected IBooleanPreference getPreference()

      Description copied from class: `OutlineSorterContribution`
      Returns a boolean-valued preference that will control the activation of the sorter. May return `null`, in which case this contribution will be effectively disabled. This method is called once, when this contribution is initializing.
      Specified by:
        `getPreference` in class `OutlineSorterContribution`
      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:
        `getComparator` in class `OutlineSorterContribution`
      Returns:
        the comparator to use when the sorter is active (not `null`)

Copyright (c) 2014, 2020 1C-Soft LLC and others. Made available under the Eclipse Public License 2.0