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/ExperimentalResultCollector.java
return super.createMethodCallCompletion(methodProposal, parameterList);
		ImageDescriptor descriptor= createMemberDescriptor(methodProposal.getFlags());
		Image image= getImage(descriptor);
		String displayName= createMethodDisplayString(methodProposal, parameterList).toString();
		int start= methodProposal.getReplaceStart();
		int end= methodProposal.getReplaceEnd();
		int relevance= methodProposal.getRelevance();
		String name= String.valueOf(methodProposal.getName());
		char[] signature= methodProposal.getSignature();
		char[][] parameterNames= methodProposal.findParameterNames(null);
		IPreferenceStore preferenceStore= JavaPlugin.getDefault().getPreferenceStore();
		if (preferenceStore.getBoolean(PreferenceConstants.CODEASSIST_GUESS_METHOD_ARGUMENTS)) {
			return new ParameterGuessingProposal(name, signature, start, end - start, image, displayName, fTextViewer, relevance, parameterNames, fCodeAssistOffset, fCompilationUnit);
		} else {
			ExperimentalProposal experimental= new ExperimentalProposal(name, signature, parameterNames, start, end - start, image, displayName, fTextViewer, relevance);
			return experimental;
		}
	}
	
	protected JavaCompletionProposal createTypeCompletion(CompletionProposal typeProposal) {
		char[] signature= typeProposal.getSignature();
		char[] packageName= Signature.getSignatureQualifier(signature); 
		char[] typeName= Signature.getSignatureSimpleName(signature);
		JavaCompletionProposal proposal= super.createTypeCompletion(typeProposal);
		JavaCompletionProposal newProposal= new GenericJavaTypeProposal(proposal.getReplacementString(), fCompilationUnit, typeProposal.getReplaceStart(), typeProposal.getReplaceEnd() - typeProposal.getReplaceStart(), proposal.getImage(), proposal.getDisplayString(), fTextViewer, proposal.getRelevance(), typeProposal.getSignature(), String.valueOf(typeName), String.valueOf(packageName));
		newProposal.setProposalInfo(proposal.getProposalInfo());
		return newProposal;
	}
}