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/javaeditor/AddImportOnSelectionAction.java
public SelectTypeQuery(Shell shell) {
			fShell= shell;
		}
		/* (non-Javadoc)
		 * @see org.eclipse.jdt.internal.corext.codemanipulation.AddImportsOperation.IChooseImportQuery#chooseImport(org.eclipse.jdt.internal.corext.util.TypeInfo[], java.lang.String)
		 */
		public TypeInfo chooseImport(TypeInfo[] results, String containerName) {
			int nResults= results.length;
			if (nResults == 0) {
				return null;
			} else if (nResults == 1) {
				return results[0];
			}
			if (containerName.length() != 0) {
				for (int i= 0; i < nResults; i++) {
					TypeInfo curr= results[i];
					if (containerName.equals(curr.getTypeContainerName())) {
						return curr;
					}
				}
			}
			fIsShowing= true;
			ElementListSelectionDialog dialog= new ElementListSelectionDialog(fShell, new TypeInfoLabelProvider(TypeInfoLabelProvider.SHOW_FULLYQUALIFIED)) {
				protected FilteredList createFilteredList(Composite parent) {
					FilteredList filteredList= super.createFilteredList(parent);
					filteredList.setComparator(ADD_IMPORT_COMPARATOR);
					return filteredList;
				}
			};
			dialog.setTitle(JavaEditorMessages.AddImportOnSelection_dialog_title);