String[] addedImports= fImportRewrite.getAddedImports(); String qualifiedName= JavaModelUtil.concatenateName(qualifier, name); for (int i= 0; i < addedImports.length; i++) { String addedImport= addedImports[i]; if (qualifiedName.equals(addedImport)) { return RES_NAME_FOUND; } else { int index= addedImport.lastIndexOf('.'); String importedName; if (index == -1) { importedName= addedImport; } else { importedName= addedImport.substring(index + 1, addedImport.length()); } if (importedName.equals(name)) { return RES_NAME_CONFLICT; } } }
	public int findInContext(String qualifier, String name, int kind) {		IBinding[] declarationsInScope= getDeclarationsInScope();		for (int i= 0; i < declarationsInScope.length; i++) {			if (declarationsInScope[i] instanceof ITypeBinding) {				ITypeBinding typeBinding= (ITypeBinding)declarationsInScope[i];				if (isSameType(typeBinding, qualifier, name)) {					return RES_NAME_FOUND;				} else if (isConflicting(typeBinding, name)) {					return RES_NAME_CONFLICT;				}			} else if (declarationsInScope[i] != null) {				if (isConflicting(declarationsInScope[i], name)) {					return RES_NAME_CONFLICT;				}			}		}				Name[] names= getImportedNames();		for (int i= 0; i < names.length; i++) {			IBinding binding= names[i].resolveBinding();			if (binding instanceof ITypeBinding) {				ITypeBinding typeBinding= (ITypeBinding)binding;				if (isConflictingType(typeBinding, qualifier, name)) {					return RES_NAME_CONFLICT;				}			}		}				List list= fCompilationUnit.types();		for (Iterator iter= list.iterator(); iter.hasNext();) {			AbstractTypeDeclaration type= (AbstractTypeDeclaration)iter.next();			ITypeBinding binding= type.resolveBinding();			if (isSameType(binding, qualifier, name)) {				return RES_NAME_FOUND;			} else {				if (containsDeclaration(binding, qualifier, name))					return RES_NAME_CONFLICT;			}		}				return RES_NAME_UNKNOWN;	}