ASTRewriteCorrectionProposal proposal= new ASTRewriteCorrectionProposal("", cu, rewrite, 1, image);
ASTRewriteCorrectionProposal proposal= new ASTRewriteCorrectionProposal("", cu, rewrite, relevance, image);
	public static ASTRewriteCorrectionProposal getCastProposal(IAssistContext context, String castType, Expression nodeToCast) throws CoreException {		ITypeBinding binding= nodeToCast.resolveTypeBinding();		if (binding != null && !canCast(castType, binding)) {			return null;		}				ICompilationUnit cu= context.getCompilationUnit();		CompilationUnit astRoot= context.getASTRoot();				ASTRewrite rewrite= new ASTRewrite(nodeToCast.getParent());				String label;		Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE);		ASTRewriteCorrectionProposal proposal= new ASTRewriteCorrectionProposal("", cu, rewrite, 1, image); //$NON-NLS-1$		String simpleCastType= proposal.addImport(castType);				if (nodeToCast.getNodeType() == ASTNode.CAST_EXPRESSION) {			label= CorrectionMessages.getFormattedString("LocalCorrectionsSubProcessor.changecast.description", castType); //$NON-NLS-1$			CastExpression expression= (CastExpression) nodeToCast;			rewrite.markAsReplaced(expression.getType(), rewrite.createPlaceholder(simpleCastType, ASTRewrite.TYPE));		} else {			label= CorrectionMessages.getFormattedString("LocalCorrectionsSubProcessor.addcast.description", castType); //$NON-NLS-1$						Expression expressionCopy= (Expression) rewrite.createCopy(nodeToCast);			int nodeType= nodeToCast.getNodeType();						if (nodeType == ASTNode.INFIX_EXPRESSION || nodeType == ASTNode.CONDITIONAL_EXPRESSION 				|| nodeType == ASTNode.ASSIGNMENT || nodeType == ASTNode.INSTANCEOF_EXPRESSION) {				// nodes have weaker precedence than cast				ParenthesizedExpression parenthesizedExpression= astRoot.getAST().newParenthesizedExpression();				parenthesizedExpression.setExpression(expressionCopy);				expressionCopy= parenthesizedExpression;			}						Type typeCopy= (Type) rewrite.createPlaceholder(simpleCastType, ASTRewrite.TYPE);			CastExpression castExpression= astRoot.getAST().newCastExpression();			castExpression.setExpression(expressionCopy);			castExpression.setType(typeCopy);						rewrite.markAsReplaced(nodeToCast, castExpression);		}		proposal.setDisplayName(label);		proposal.ensureNoModifications();				return proposal;	}