Interface ContentCompletionSortPriorityAssigner


@API(type=EXTENDABLE, src=PUBLIC) public interface ContentCompletionSortPriorityAssigner
Extension that can be used to assign sorting priorities for elements.

The elements in the content completion menu will be sorted according to this priority and in case of equality the display name is used.

By default, all entries have priority 0 except for "Split" / "New" - type entries which have priority CCItemProxy.SPLIT_ITEM_PRIORITY.

The instance can be returned from a WebappExtensionsProvider implementation, by implementing the WebappExtensionsProvider.getSortPriorityAssigner() method.
The WebappExtensionsProvider instance can be returned from an ExtensionsBundle implementation, by implementing the ExtensionsBundle.getWebappExtensionsProvier() method.
Since:
21.1
  • Method Details

    • getImposedSortPriority

      int getImposedSortPriority(WhatElementsCanGoHereContext context, CCItemProxy ccItem)
      Return the imposed sort priority for the given content completion item.
      Parameters:
      context - Context in which the content completion is invoked.
      ccItem - A proxy to the content completion item.
      Returns:
      A number, specifying the sorting priority. Larger number means higher in the list.