Bug 4978 Completion list not ordered as expected
Type "fo" and press ctrl-space The best matches are the "for" templates but they are at the end of the list
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateEngine.java
private String fPartitionType;
	
	private ITextViewer fViewer;
	
	private ArrayList fExactProposals= new ArrayList();
	private ArrayList fNotExactProposals= new ArrayList();
	public TemplateEngine(String partitionType) {
		Assert.isNotNull(partitionType);
		fPartitionType= new String(partitionType);
	}
	/**
	 * Empties the collector.
	 */
	public void reset(ITextViewer viewer) {
		fViewer= viewer;
		fExactProposals.clear();
		fNotExactProposals.clear();		
	}
	/**
	 * Returns an array of templates matching exactly.
	 */
	public ICompletionProposal[] getExactResults() {
		return (ICompletionProposal[]) fExactProposals.toArray(new ICompletionProposal[fExactProposals.size()]);
	}
	
	/**
	 * Returns an array of templates matching not exactly.
	 */
	public ICompletionProposal[] getNotExactResults() {
		return (ICompletionProposal[]) fNotExactProposals.toArray(new ICompletionProposal[fNotExactProposals.size()]);