Bug 93509 Code assist insert strange import
public class A<LHS, RHS> { LHS lhs; RHS rhs; { A<? extends Object, ? extends Number> a= null; } L<code assist> } - trigger code assist at the location above - select LHS. Observe you get an import on LHS
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaTypeCompletionProposal.java
IType[] types= impStructure.getCompilationUnit().getTypes();
			if (types.length > 0 && types[0].getSourceRange().getOffset() <= offset) {
				
				setReplacementString(impStructure.addImport(getReplacementString()));
				return true;
			}
		}
		return false;
	}
	/* (non-Javadoc)
	 * @see ICompletionProposalExtension#apply(IDocument, char, int)
	 */
	public void apply(IDocument document, char trigger, int offset) {
		try {
			ImportsStructure impStructure= null;
			if (fCompilationUnit != null && allowAddingImports()) {
				IJavaProject project= fCompilationUnit.getJavaProject();
				String[] prefOrder= JavaPreferencesSettings.getImportOrderPreference(project);
				int threshold= JavaPreferencesSettings.getImportNumberThreshold(project);
				impStructure= new ImportsStructure(fCompilationUnit, prefOrder, threshold, true);
			}
			boolean importAdded= updateReplacementString(document, trigger, offset, impStructure);
			if (importAdded)
				setCursorPosition(getReplacementString().length());
			super.apply(document, trigger, offset);
			if (importAdded && impStructure != null) {
				int oldLen= document.getLength();
				impStructure.getResultingEdits(document, new NullProgressMonitor()).apply(document, TextEdit.UPDATE_REGIONS);
				setReplacementOffset(getReplacementOffset() + document.getLength() - oldLen);
			}