|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.wst.jsdt.ui.text.java.AbstractProposalSorter
public abstract class AbstractProposalSorter
Abstract base class for sorters contributed to the
org.eclipse.wst.jsdt.ui.javaCompletionProposalSorters
extension point.
Subclasses need to implement compare(ICompletionProposal, ICompletionProposal)
and may
override beginSorting
and
endSorting
.
The orderings imposed by a subclass need not be consistent with equals.
Provisional API: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.
Method Summary | |
---|---|
void |
beginSorting(ContentAssistInvocationContext context)
Called once before sorting. |
abstract int |
compare(ICompletionProposal p1,
ICompletionProposal p2)
Implements the same contract as Comparator.compare(Object, Object) but with
completion proposals as parameters. |
void |
endSorting()
Called once after sorting. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
---|
equals |
Method Detail |
---|
public void beginSorting(ContentAssistInvocationContext context)
Clients may override, the default implementation does nothing.
context
- the context of the content assist invocationpublic abstract int compare(ICompletionProposal p1, ICompletionProposal p2)
Comparator.compare(Object, Object)
but with
completion proposals as parameters. This method will implement the Comparator
interface if this class is ever converted to extend
Comparator<ICompletionProposal>
.
The orderings imposed by an implementation need not be consistent with equals.
compare
in interface java.util.Comparator
p1
- the first proposal to be comparedp2
- the second proposal to be compared
public void endSorting()
Clients may override, the default implementation does nothing.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |