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
return;
		if (!ActionUtil.isProcessable(getShell(), cu))
			return;
		ISelection selection= fEditor.getSelectionProvider().getSelection();
		IDocument doc= fEditor.getDocumentProvider().getDocument(fEditor.getEditorInput());
		if (selection instanceof ITextSelection && doc != null) {
			final ITextSelection textSelection= (ITextSelection) selection;
			AddImportOnSelectionAction.SelectTypeQuery query= new SelectTypeQuery(getShell());
			AddImportsOperation op= new AddImportsOperation(cu, doc, textSelection.getOffset(), textSelection.getLength(), query);
			IEditingSupport helper= createViewerHelper(textSelection, query);
			try {
				registerHelper(helper);
				IProgressService progressService= PlatformUI.getWorkbench().getProgressService();
				progressService.runInUI(fEditor.getSite().getWorkbenchWindow(), new WorkbenchRunnableAdapter(op, op.getScheduleRule()), op.getScheduleRule());
				IStatus status= op.getStatus();
				if (!status.isOK()) {
					IStatusLineManager manager= getStatusLineManager();
					if (manager != null) {
						manager.setMessage(status.getMessage());
					}
				}
			} catch (InvocationTargetException e) {
				ExceptionHandler.handle(e, getShell(), JavaEditorMessages.AddImportOnSelection_error_title, null);
			} catch (InterruptedException e) {
				
			} finally {
				deregisterHelper(helper);
			}
		}
	}