Bug 120078 [clean up][infrastructure] rename Convert*LoopProposal as Convert*LoopOperation and move to corext
Version: 3.2.0 Build id: I20051206-1200
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ConvertIterableLoopProposal.java
private final String fIdentifierName;
	/**
	 * Creates a new convert iterable loop proposal.
	 * 
	 * @param unit the compilation unit containing the for statement
	 * @param statement the for statement to be converted
	 */
	public ConvertIterableLoopProposal(final CompilationUnit unit, final ForStatement statement, String identifierName) {
		fIdentifierName= identifierName;
		fCompilationUnit= (ICompilationUnit)unit.getJavaElement();
		fStatement= statement;
		fRoot= (CompilationUnit) statement.getRoot();
	}
	private List computeElementNames() {
		final List names= new ArrayList();
		final IJavaProject project= fCompilationUnit.getJavaProject();
		String name= fIdentifierName;
		final ITypeBinding binding= fIterator.getType();
		if (binding != null && binding.isParameterizedType())
			name= binding.getTypeArguments()[0].getName();
		final List excluded= getExcludedNames();
		final String[] suggestions= StubUtility.getLocalNameSuggestions(project, name, 0, (String[]) excluded.toArray(new String[excluded.size()]));
		for (int index= 0; index < suggestions.length; index++)
			names.add(suggestions[index]);
		return names;
	}
	private List getExcludedNames() {
		final CompilationUnit unit= (CompilationUnit) fStatement.getRoot();
		final IBinding[] before= (new ScopeAnalyzer(unit)).getDeclarationsInScope(fStatement.getStartPosition(), ScopeAnalyzer.VARIABLES);
		final IBinding[] after= (new ScopeAnalyzer(unit)).getDeclarationsAfter(fStatement.getStartPosition() + fStatement.getLength(), ScopeAnalyzer.VARIABLES);