Bug 84194 [content assist] Code assist in import statements insert at the end
Build: I-20050201 Open any Java file that contains > 1 import statements. Let's say the first import statement reads: import org.eclipse.core.runtime.*; delete the '*;' from the end and try to use code assist to insert IRunnableWithProgress for example. You will see that upon pressing Enter to select, the text gets inserted several lines down under all the import statements. the cursor is now in a random position also.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaTypeCompletionProposal.java
if (typeName == null)
			return null;
			
		if (packageName.length() == 0)
			return typeName;
		return packageName + '.' + typeName;
	}
	public JavaTypeCompletionProposal(String replacementString, ICompilationUnit cu, int replacementOffset, int replacementLength, Image image, String displayString, int relevance) {
		this(replacementString, cu, replacementOffset, replacementLength, image, displayString, relevance, null, null);
	}
	public JavaTypeCompletionProposal(String replacementString, ICompilationUnit cu, int replacementOffset, int replacementLength, Image image, String displayString, int relevance,
		String typeName, String packageName)
	{
		this(replacementString, cu, replacementOffset, replacementLength, image, displayString, relevance, typeName, packageName, null);
	}
	
	public JavaTypeCompletionProposal(String replacementString, ICompilationUnit cu, int replacementOffset, int replacementLength, Image image, String displayString, int relevance,
		String typeName, String packageName, ITextViewer viewer)
	{
		super(replacementString, replacementOffset, replacementLength, image, displayString, relevance, viewer);
		fCompilationUnit= cu;
		fUnqualifiedTypeName= unqualify(typeName);
		fFullyQualifiedTypeName= qualify(typeName, packageName);
	}
	
	protected boolean updateReplacementString(IDocument document, char trigger, int offset, ImportsStructure impStructure) throws CoreException, BadLocationException {
		if (impStructure != null && fFullyQualifiedTypeName != null && getReplacementString().startsWith(fFullyQualifiedTypeName)) {
			IType[] types= impStructure.getCompilationUnit().getTypes();
			if (types.length > 0 && types[0].getSourceRange().getOffset() <= offset) {