Bug 77222 Import Selection Dialog Improvements
It is very annoying, when importing List, to have to choose which List I want, especially since I nearly ALWAYS choose java.util.List. Specifically, when doing an Organize Imports, a dialog shows up, and it appears to list all of the List classes in alphabetical order by package name. (I think this dialog will show up in other places, but I'm not sure. I know I also see the same list ina different form with QuickFix- Add Import). I envision a number of different ways this list of classes can be improved, but (1) the simplest to use and maybe implement would be to make sort-order pluggable. I can see two variants on sort order that I might like - 1a) Let the user define preferences based on leading package fragments - java.*, before all others 1b) Sort the list based on frequency of use in the current project. This way, over time, the ones I'm using naturally bubble to the top. (2) An additional possibility would be to allow the user to explictly exclude/hide classes they never use. A number of libraries I use might have their own List, which is public, but it's never intended to be used by the clients of the JAR. If I could, over time, build up this knoweldgebase of classes in libraries that I just do not want to see, or very seldom wish to see, the list could be appropriately resticted.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ResultCollector.java
* @param codeAssistOffset The Offset at which the code assist will be called.
	 * Used to modify the offsets of the created proposals. ('Non Eating')
	 * @param contextOffset The offset at which the context presumable start or -1.
	 * @param jproject The Java project to which the underlying source belongs.
	 * Needed to find types referred.
	 * @param cu The compilation unit that is edited. Used to add import statements.
	 * Can be <code>null</code> if no import statements should be added.
	 */
	public void reset(int codeAssistOffset, int contextOffset, IJavaProject jproject, ICompilationUnit cu) {
		fJavaProject= jproject;
		fCompilationUnit= cu;
		fCodeAssistOffset= codeAssistOffset;
		fContextOffset= contextOffset;
		
		fUserReplacementLength= -1;
		
		fLastProblem= null;
		
		for (int i= 0; i < fResults.length; i++)
			fResults[i].clear();
		
		fSuggestedMethodNames.clear();
	}
	/**
	 * Specifies the context of the code assist operation.
	 * @param codeAssistOffset The Offset on which the code assist will be called.
	 * Used to modify the offsets of the created proposals. ('Non Eating')
	 * @param jproject The Java project to which the underlying source belongs.
	 * Needed to find types referred.
	 * @param cu The compilation unit that is edited. Used to add import statements.