Bug 31821 Quick fix for unused imports
build I20030211 It would be nice to have a quick fix for unused import warnings which simply removes the import.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/NewMethodCompletionProposal.java
takenNames.add(name);
			return name;
		}
		
		int dim= 0;
		if (type.isArrayType()) {
			ArrayType arrayType= (ArrayType) type;
			dim= arrayType.getDimensions();
			type= arrayType.getElementType();
		}
		String typeName= ASTNodes.getTypeName(type);
		String packName= Signature.getQualifier(typeName);
		
		IJavaProject project= getCompilationUnit().getJavaProject();
		String[] excludedNames= (String[]) takenNames.toArray(new String[takenNames.size()]);
		String[] names= NamingConventions.suggestArgumentNames(project, packName, typeName, dim, excludedNames);
		takenNames.add(names[0]);
		return names[0];
	}
			
	private int findInsertIndex(List decls, int currPos) {
		int nDecls= decls.size();
		for (int i= 0; i < nDecls; i++) {
			ASTNode curr= (ASTNode) decls.get(i);
			if (curr instanceof MethodDeclaration && currPos < curr.getStartPosition() + curr.getLength()) {
				return i + 1;
			}
		}
		return nDecls;
	}