Bug 102846 [quick fix] Convert to enhanced for loop does not remove obsolete import
I20050627-1435 (3.1) The 'Convert to enhanced for loop' quick fix does not remove the obsolete import java.util.Iterator in this example: import java.util.Iterator; import java.util.List; public class Try { public static void print(List<String> names) { for (Iterator iter= names.iterator(); iter.hasNext();) { String name= (String) iter.next(); System.out.println(name); } } }
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ConvertIterableLoopProposal.java
private IBinding fElement= null;
	
	private Expression fExpression= null;
	
	private IBinding fIterable= null;
	
	private IVariableBinding fIterator= null;
	
	private List fOccurrences= new ArrayList(2);
	
	private final ForStatement fStatement;
	/**
	 * Creates a new convert iterable loop proposal.
	 * 
	 * @param name the name of the correction proposal
	 * @param unit the compilation unit containing the for statement
	 * @param statement the for statement to be converted
	 * @param relevance the relevance of the proposal
	 * @param image the image of the proposal
	 */
	public ConvertIterableLoopProposal(final String name, final ICompilationUnit unit, final ForStatement statement, final int relevance, final Image image) {
		super(name, unit, null, relevance, image);
		fStatement= statement;
		fAst= statement.getAST();
	}
	private List computeElementNames() {
		final List names= new ArrayList();
		final IJavaProject project= getCompilationUnit().getJavaProject();
		String name= GROUP_ELEMENT;