Java 类org.eclipse.jface.text.contentassist.ICompletionProposalSorter 实例源码

项目:typescript.java    文件:TypeScriptCompletionProcessor.java   
public TypeScriptCompletionProcessor(ITextEditor editor, ContentAssistant assistant, String partition) {
    super(editor, assistant, partition);
    this.editor = editor;
    assistant.setSorter(new ICompletionProposalSorter() {

        @Override
        public int compare(ICompletionProposal p1, ICompletionProposal p2) {
            return RELEVANCE_SORTER.compare(p1, p2);
        }
    });
}