ITypeBinding declaringClassBinding = field.getDeclaringClass(); if (declaringClassBinding == null) return null; IType declaringClass = findType(declaringClassBinding, in); if (declaringClass == null) return null; IField foundField= declaringClass.getField(field.getName()); if (! foundField.exists()) return null; return foundField;
IField originalFindField= originalFindField(field, in); if (CHECK_CORE_BINDING_GET_JAVA_ELEMENT) { IField iField= (IField) field.getJavaElement(); if (iField != null && ! iField.equals(originalFindField) || iField == null && originalFindField != null) { JavaPlugin.logRepeatedMessage("IVariableBinding#getJavaElement() is not correct element", "field == " + field.getKey() + ", project == " + in.getElementName() + ", iField == " + iField + ", originalFindField == " + originalFindField); } } return originalFindField;
	public static IField findField(IVariableBinding field, IJavaProject in) throws JavaModelException {		Assert.isTrue(field.isField());		ITypeBinding declaringClassBinding = field.getDeclaringClass();		if (declaringClassBinding == null)			return null;		IType declaringClass = findType(declaringClassBinding, in);		if (declaringClass == null)			return null;	    IField foundField= declaringClass.getField(field.getName());	    if (! foundField.exists())	    	return null;		return foundField;	}