if (parent instanceof MethodInvocation && node.equals(((MethodInvocation)parent).getExpression())) {
if (node.getLocationInParent() == MethodInvocation.EXPRESSION_PROPERTY) {
	public static void getVariableProposals(IInvocationContext context, IProblemLocation problem, Collection proposals) throws CoreException {				ICompilationUnit cu= context.getCompilationUnit();				CompilationUnit astRoot= context.getASTRoot();		ASTNode selectedNode= problem.getCoveredNode(astRoot);		if (selectedNode == null) {			return;		}				// type that defines the variable		ITypeBinding binding= null;		ITypeBinding declaringTypeBinding= Bindings.getBindingOfParentType(selectedNode);		if (declaringTypeBinding == null) {			return;		}				// possible type kind of the node		boolean suggestVariableProposals= true;		int typeKind= 0;				while (selectedNode instanceof ParenthesizedExpression) {			selectedNode= ((ParenthesizedExpression) selectedNode).getExpression();		}						Name node= null;		switch (selectedNode.getNodeType()) {			case ASTNode.SIMPLE_NAME:				node= (SimpleName) selectedNode;				ASTNode parent= node.getParent();				if (parent instanceof MethodInvocation && node.equals(((MethodInvocation)parent).getExpression())) {					typeKind= SimilarElementsRequestor.CLASSES;				} else if (parent instanceof SimpleType) {					suggestVariableProposals= false;					typeKind= SimilarElementsRequestor.REF_TYPES;				} else if (parent instanceof QualifiedName) {					Name qualifier= ((QualifiedName) parent).getQualifier();					if (qualifier != node) {						binding= qualifier.resolveTypeBinding();					} else {						typeKind= SimilarElementsRequestor.REF_TYPES;					}					ASTNode outerParent= parent.getParent();					while (outerParent instanceof QualifiedName) {						outerParent= outerParent.getParent();					}					if (outerParent instanceof SimpleType) {						typeKind= SimilarElementsRequestor.REF_TYPES;						suggestVariableProposals= false;					}				}				break;					case ASTNode.QUALIFIED_NAME:				QualifiedName qualifierName= (QualifiedName) selectedNode;				ITypeBinding qualifierBinding= qualifierName.getQualifier().resolveTypeBinding();				if (qualifierBinding != null) {					node= qualifierName.getName();					binding= qualifierBinding;				} else {					node= qualifierName.getQualifier();					typeKind= SimilarElementsRequestor.REF_TYPES;					suggestVariableProposals= node.isSimpleName();				}				if (selectedNode.getParent() instanceof SimpleType) {					typeKind= SimilarElementsRequestor.REF_TYPES;					suggestVariableProposals= false;				}				break;					case ASTNode.FIELD_ACCESS:				FieldAccess access= (FieldAccess) selectedNode;				Expression expression= access.getExpression();				if (expression != null) {					binding= expression.resolveTypeBinding();					if (binding != null) {						node= access.getName();					}				}				break;			case ASTNode.SUPER_FIELD_ACCESS:				binding= declaringTypeBinding.getSuperclass();				node= ((SuperFieldAccess) selectedNode).getName();				break;			default:		}				if (node == null) {			return;		}				// add type proposals		if (typeKind != 0) {			int relevance= Character.isUpperCase(ASTNodes.getSimpleNameIdentifier(node).charAt(0)) ? 3 : 0;			addSimilarTypeProposals(typeKind, cu, node, relevance + 1, proposals);			addNewTypeProposals(cu, node, SimilarElementsRequestor.REF_TYPES, relevance, proposals);		}				if (!suggestVariableProposals) {			return;		}				SimpleName simpleName= node.isSimpleName() ? (SimpleName) node : ((QualifiedName) node).getName();		boolean isWriteAccess= ASTResolving.isWriteAccess(node);				// similar variables		addSimilarVariableProposals(cu, astRoot, binding, simpleName, isWriteAccess, proposals);					// new fields		addNewFieldProposals(cu, astRoot, binding, declaringTypeBinding, simpleName, isWriteAccess, proposals);				// new parameters and local variables		if (binding == null) {			addNewVariableProposals(cu, node, simpleName, proposals);		}	}