}  ITypeBinding superClass= currTypeBinding.getSuperclass(); while (superClass != null) { if (isContained(typeBinding, superClass.getDeclaredTypes())) { return false; } superClass= superClass.getSuperclass();
		private boolean needsImport(ITypeBinding typeBinding, SimpleName ref) {			if (!typeBinding.isTopLevel() && !typeBinding.isMember()) {				return false; // no imports for anonymous, local, primitive types			}			int modifiers= typeBinding.getModifiers();			if (Modifier.isPrivate(modifiers)) {				return false; // imports for privates are not required			}			TypeDeclaration currType= (TypeDeclaration) ASTNodes.getParent(ref, ASTNode.TYPE_DECLARATION);			if (currType == null || currType.resolveBinding() == null) {				return false; // not in a type			}			ITypeBinding currTypeBinding= currType.resolveBinding();			if (!Modifier.isPublic(modifiers) && !Modifier.isProtected(modifiers)) {				if (!currTypeBinding.getPackage().getName().equals(typeBinding.getPackage().getName())) {					return false; // not visible				}			}						if (typeBinding.isMember()) {				if (isContained(typeBinding, currTypeBinding.getDeclaredTypes())) {					return false; // inner type of our type				}				ITypeBinding declaring= currTypeBinding.getDeclaringClass();				while (declaring != null) {					if (isContained(typeBinding, declaring.getDeclaredTypes())) {						return false; // inner type of the declaring type					}					declaring= declaring.getDeclaringClass();				}								ITypeBinding superClass= currTypeBinding.getSuperclass();				while (superClass != null) {					if (isContained(typeBinding, superClass.getDeclaredTypes())) {						return false; // inner type of super type					}					superClass= superClass.getSuperclass();				}			}			return true;						}