Bug 65682 AddImportOnSelectionAction.findAllTypes does not use AllTypesCache
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/AddImportOnSelectionAction.java
try {
					int nameStart= getNameStart(doc, selection.getOffset());
					int nameEnd= getNameEnd(doc, selection.getOffset() + selection.getLength());
					int len= nameEnd - nameStart;
					
					String name= doc.get(nameStart, len).trim();
					String simpleName= Signature.getSimpleName(name);
					String containerName= Signature.getQualifier(name);
					
					
					IImportDeclaration existingImport= JavaModelUtil.findImport(cu, simpleName);
					if (existingImport != null) {
						if (!existingImport.getElementName().equals(name)) {
							getShell().getDisplay().beep();
							IStatusLineManager manager= getStatusLineManager();
							if (manager != null) {
								String message= JavaEditorMessages.getFormattedString("AddImportOnSelection.error.importclash", existingImport.getElementName()); 
								manager.setErrorMessage(message);
							}
						} else {
							removeQualification(doc, nameStart, containerName);
						}
						return;
					}			
					
					IJavaSearchScope searchScope= SearchEngine.createJavaSearchScope(new IJavaElement[] { cu.getJavaProject() });
					
					TypeInfo[] types= findAllTypes(simpleName, searchScope, null);
					if (types.length== 0) {
						getShell().getDisplay().beep();