if (invocationNode.getNodeType() == ASTNode.CAST_EXPRESSION) {
if (target.getNodeType() != ASTNode.CAST_EXPRESSION) { String targetName= null; if (target.getLength() <= 18) { targetName= ASTNodes.asString(target); }
	private static void addMissingCastParentsProposal(ICompilationUnit cu, MethodInvocation invocationNode, Collection proposals) {		Expression sender= invocationNode.getExpression();		if (sender instanceof ThisExpression) {			return;		}				ITypeBinding senderBinding= sender.resolveTypeBinding();		if (senderBinding == null || Modifier.isFinal(senderBinding.getModifiers())) {			return;		}				if (sender instanceof Name && ((Name) sender).resolveBinding() instanceof ITypeBinding) {			return; // static access		}				ASTNode parent= invocationNode.getParent();		while (parent instanceof Expression && parent.getNodeType() != ASTNode.CAST_EXPRESSION) {			parent= parent.getParent();		}		boolean hasCastProposal= false;		if (parent instanceof CastExpression) {			//	(TestCase) x.getName() -> ((TestCase) x).getName			hasCastProposal= useExistingParentCastProposal(cu, (CastExpression) parent, sender, invocationNode.getName(), getArgumentTypes(invocationNode.arguments()), proposals);		}		if (!hasCastProposal) {			// x.getName() -> ((TestCase) x).getName						Expression target= sender;			while (target instanceof ParenthesizedExpression) {				target= ((ParenthesizedExpression) target).getExpression();			}			String targetName= null;			if (target.getLength() <= 18) {				targetName= '\'' + ASTNodes.asString(target) + '\'';			}			String label;			if (invocationNode.getNodeType() == ASTNode.CAST_EXPRESSION) {				if (targetName == null) {					label= CorrectionMessages.getString("UnresolvedElementsSubProcessor.methodtargetcast.description"); //$NON-NLS-1$				} else {					label= CorrectionMessages.getFormattedString("UnresolvedElementsSubProcessor.methodtargetcast2.description", targetName); //$NON-NLS-1$				}			} else {				if (targetName == null) {					label= CorrectionMessages.getString("UnresolvedElementsSubProcessor.changemethodtargetcast.description"); //$NON-NLS-1$				} else {					label= CorrectionMessages.getFormattedString("UnresolvedElementsSubProcessor.changemethodtargetcast2.description", targetName); //$NON-NLS-1$				}			}			proposals.add(new CastCompletionProposal(label, cu, sender, null, 3));		}	}