return assignment.getLeftHandSide().resolveTypeBinding(); case ASTNode.INFIX_EXPRESSION: InfixExpression infix= (InfixExpression) parent; if (node.equals(infix.getLeftOperand())) {  return infix.getRightOperand().resolveTypeBinding(); }  InfixExpression.Operator op= infix.getOperator(); if (op == InfixExpression.Operator.LEFT_SHIFT || op == InfixExpression.Operator.RIGHT_SHIFT_UNSIGNED || op == InfixExpression.Operator.RIGHT_SHIFT_SIGNED) { return infix.getAST().resolveWellKnownType("int"); } return infix.getLeftOperand().resolveTypeBinding();
break;
	private static ITypeBinding getPossibleTypeBinding(ASTNode node) {			ASTNode parent= node.getParent();		switch (parent.getNodeType()) {		case ASTNode.ASSIGNMENT:			Assignment assignment= (Assignment) parent;			if (node.equals(assignment.getLeftHandSide())) {				// field write access: xx= expression				return assignment.getRightHandSide().resolveTypeBinding();			}			// read access			return assignment.getLeftHandSide().resolveTypeBinding();		case ASTNode.INFIX_EXPRESSION:			InfixExpression infix= (InfixExpression) parent;			if (node.equals(infix.getLeftOperand())) {				// xx == expression				return infix.getRightOperand().resolveTypeBinding();			}			// expression == xx			InfixExpression.Operator op= infix.getOperator();			if (op == InfixExpression.Operator.LEFT_SHIFT || op == InfixExpression.Operator.RIGHT_SHIFT_UNSIGNED							|| op == InfixExpression.Operator.RIGHT_SHIFT_SIGNED) {				return infix.getAST().resolveWellKnownType("int"); //$NON-NLS-1$			}			return infix.getLeftOperand().resolveTypeBinding();		case ASTNode.INSTANCEOF_EXPRESSION:			InstanceofExpression instanceofExpression= (InstanceofExpression) parent;			return instanceofExpression.getRightOperand().resolveBinding();		case ASTNode.VARIABLE_DECLARATION_FRAGMENT:			VariableDeclarationFragment frag= (VariableDeclarationFragment) parent;			if (frag.getInitializer().equals(node)) {				ASTNode declaration= frag.getParent();				if (declaration instanceof VariableDeclarationStatement) {					return ((VariableDeclarationStatement)declaration).getType().resolveBinding();				} else if (declaration instanceof FieldDeclaration) {					return ((FieldDeclaration)declaration).getType().resolveBinding();				}			}			break;		case ASTNode.METHOD_INVOCATION:			MethodInvocation methodInvocation= (MethodInvocation) parent;			SimpleName name= methodInvocation.getName();			IMethodBinding methodBinding= ASTNodes.getMethodBinding(name);			if (methodBinding != null) {				return getParameterTypeBinding(node, methodInvocation.arguments(), methodBinding);			}			break;					case ASTNode.SUPER_CONSTRUCTOR_INVOCATION:			SuperConstructorInvocation superInvocation= (SuperConstructorInvocation) parent;			IMethodBinding superBinding= superInvocation.resolveConstructorBinding();			if (superBinding != null) {				return getParameterTypeBinding(node, superInvocation.arguments(), superBinding);			}			break;		case ASTNode.CONSTRUCTOR_INVOCATION:			ConstructorInvocation constrInvocation= (ConstructorInvocation) parent;			IMethodBinding constrBinding= constrInvocation.resolveConstructorBinding();			if (constrBinding != null) {				return getParameterTypeBinding(node, constrInvocation.arguments(), constrBinding);			}			break;		case ASTNode.CLASS_INSTANCE_CREATION:			ClassInstanceCreation creation= (ClassInstanceCreation) parent;			IMethodBinding creationBinding= creation.resolveConstructorBinding();			if (creationBinding != null) {				return getParameterTypeBinding(node, creation.arguments(), creationBinding);			}			break;		case ASTNode.PARENTHESIZED_EXPRESSION:			return getTypeBinding(parent);		case ASTNode.ARRAY_ACCESS:			if (((ArrayAccess) parent).getIndex().equals(node)) {				return parent.getAST().resolveWellKnownType("int"); //$NON-NLS-1$			}			break;		case ASTNode.ARRAY_CREATION:			if (((ArrayCreation) parent).dimensions().contains(node)) {				return parent.getAST().resolveWellKnownType("int"); //$NON-NLS-1$			}			break;				case ASTNode.ARRAY_INITIALIZER:			ASTNode initializerParent= parent.getParent();			if (initializerParent instanceof ArrayCreation) {				return ((ArrayCreation) initializerParent).getType().getElementType().resolveBinding();			}			break;		case ASTNode.CONDITIONAL_EXPRESSION:			ConditionalExpression expression= (ConditionalExpression) parent;			if (node.equals(expression.getExpression())) {				return parent.getAST().resolveWellKnownType("boolean"); //$NON-NLS-1$			}			if (node.equals(expression.getElseExpression())) {				return expression.getThenExpression().resolveTypeBinding();			}			return expression.getElseExpression().resolveTypeBinding();		case ASTNode.POSTFIX_EXPRESSION:			return parent.getAST().resolveWellKnownType("int"); //$NON-NLS-1$		case ASTNode.PREFIX_EXPRESSION:			if (((PrefixExpression) parent).getOperator() == PrefixExpression.Operator.NOT) {				return parent.getAST().resolveWellKnownType("boolean"); //$NON-NLS-1$			}			return parent.getAST().resolveWellKnownType("int"); //$NON-NLS-1$		case ASTNode.IF_STATEMENT:		case ASTNode.WHILE_STATEMENT:		case ASTNode.DO_STATEMENT:			if (node instanceof Expression) {				return parent.getAST().resolveWellKnownType("boolean"); //$NON-NLS-1$			}			break;		case ASTNode.SWITCH_STATEMENT:			if (((SwitchStatement) parent).getExpression().equals(node)) {				return parent.getAST().resolveWellKnownType("int"); //$NON-NLS-1$			}			break;		case ASTNode.RETURN_STATEMENT:			MethodDeclaration decl= findParentMethodDeclaration(parent);			if (decl != null) {				return decl.getReturnType().resolveBinding();			}			break;		case ASTNode.CAST_EXPRESSION:			return ((CastExpression) parent).getType().resolveBinding();        case ASTNode.THROW_STATEMENT:        case ASTNode.CATCH_CLAUSE:            return parent.getAST().resolveWellKnownType("java.lang.Exception"); //$NON-NLS-1$		}					return null;	}