Bug 127045 TypeInfoUtil.searchTypeInfo unnecessary
20060209 TypeInfoUtil.searchTypeInfo performs a search just to get a type info. This is too expensive and unnecessary. Either change the history to store qualified names or allow to create a type info from a qualified name (problem is the enclosing type names, so either we cheat there, or we need also the package name to evaluate the enclosing type names)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/LazyJavaTypeCompletionProposal.java
*/
	protected String computeSortString() {
		
		return getSimpleTypeName() + Character.MIN_VALUE + getQualifiedTypeName();
	}
	
	/*
	 * @see org.eclipse.jdt.internal.ui.text.java.LazyJavaCompletionProposal#computeRelevance()
	 */
	protected int computeRelevance() {
		/*
		 * There are two histories: the RHS history remembers types used for the current expected
		 * type (right hand side), while the type history remembers recently used types in general).
		 * 
		 * The presence of an RHS ranking is a much more precise sign for relevance as it proves the
		 * subtype relationship between the proposed type and the expected type.
		 * 
		 * The "recently used" factor (of either the RHS or general history) is less important, it should
		 * not override other relevance factors such as if the type is already imported etc.
		 */
		float rhsHistoryRank= fInvocationContext.getHistoryRelevance(getQualifiedTypeName());
		float typeHistoryRank= TypeInfoHistory.getDefault().getNormalizedPosition(getQualifiedTypeName());
		int recencyBoost= Math.round((rhsHistoryRank + typeHistoryRank) * 5);
		int rhsBoost= rhsHistoryRank > 0.0f ? 50 : 0;
		int baseRelevance= super.computeRelevance();
		
		return baseRelevance +  rhsBoost + recencyBoost;
	}
}