Bug 12911 Open Type dialog doesn't always combine types with same name
Build 20020321 Create the following three classes: bar.FOO baz.Foo quux.FOO Now open the 'Open Type' dialog, and type in 'foo'. The list will have three entries in it: +-----+ | FOO | | Foo | | FOO | +-----+ This is incorrect. The two 'FOO' entries should be combined, and the list should look like: +-----+ | FOO | | Foo | +-----+ I suspect that this is due to a compare function which doesn't distinguish between strings which only differ by case, causing them to appear in an arbitrary order in a sorted list.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/TypeSelectionDialog.java
private static class TypeFilterMatcher implements FilteredList.FilterMatcher {
		private StringMatcher fMatcher;
		private StringMatcher fQualifierMatcher;
		
		/*
		 * @see FilteredList.FilterMatcher#setFilter(String, boolean)
		 */
		public void setFilter(String pattern, boolean ignoreCase, boolean igoreWildCards) {
			int qualifierIndex= pattern.lastIndexOf("."); 
						
			if (qualifierIndex == -1) {
				fQualifierMatcher= null;
				fMatcher= new StringMatcher(pattern + '*', ignoreCase, igoreWildCards);
				
			
			} else {
				fQualifierMatcher= new StringMatcher(pattern.substring(0, qualifierIndex), ignoreCase, igoreWildCards);
				fMatcher= new StringMatcher(pattern.substring(qualifierIndex + 1), ignoreCase, igoreWildCards);
			}
		}
		/*
		 * @see FilteredList.FilterMatcher#match(Object)