Bug 66635 AddImportOnSelectionAction passes null process monitor to all types cache
I20040611_0100 Title says it all. We should avoid passing in null since the operation can take a while.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/AddImportOnSelectionAction.java
doc.replace(nameStart, containerLen + 1, ""); 
			}
		}
	}	
	/**
	 * Finds a type by the simple name.
	 */
	private static TypeInfo[] findAllTypes(String simpleTypeName, IJavaSearchScope searchScope, IProgressMonitor monitor) {
		return AllTypesCache.getTypesForName(simpleTypeName, searchScope, monitor);
	}
	
	private Shell getShell() {
		return fEditor.getSite().getShell();
	}
		
						
	private TypeInfo selectResult(TypeInfo[] results, String containerName, Shell shell) {
		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;