Class AbstractProposalSorter

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractProposalSorter()
      Creates a new sorter.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void beginSorting​(ContentAssistInvocationContext context)
      Called once before initial sorting starts the first time.
      abstract int compare​(ICompletionProposal p1, ICompletionProposal p2)
      The orderings imposed by an implementation need not be consistent with equals.
      void endSorting()
      Called once after the initial sorting finished.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Comparator

        equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
    • Method Detail

      • beginSorting

        public void beginSorting​(ContentAssistInvocationContext context)
        Called once before initial sorting starts the first time.

        Note: As of 3.8 a completion proposal computer can request that proposals are resorted. If such a computer is active, then this method will not be called.

        Clients may override, the default implementation does nothing.

        Parameters:
        context - the context of the content assist invocation
      • compare

        public abstract int compare​(ICompletionProposal p1,
                                    ICompletionProposal p2)
        The orderings imposed by an implementation need not be consistent with equals.
        Specified by:
        compare in interface java.util.Comparator<ICompletionProposal>
        Specified by:
        compare in interface ICompletionProposalSorter
        Parameters:
        p1 - the first proposal to be compared
        p2 - the second proposal to be compared
        Returns:
        a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second
        See Also:
        Comparator.compare(java.lang.Object, java.lang.Object)
      • endSorting

        public void endSorting()
        Called once after the initial sorting finished.

        Note: As of 3.8 a completion proposal computer can request that proposals are resorted. If such a computer is active, then this method will not be called.

        Clients may override, the default implementation does nothing.