rewrite.markAsInserted(type); ((MethodDeclaration) decl).setReturnType(type);  proposals.add(proposal); }
MethodDeclaration modifiedNode= ast.newMethodDeclaration(); modifiedNode.setModifiers(methodDeclaration.getModifiers()); modifiedNode.setExtraDimensions(methodDeclaration.getExtraDimensions()); modifiedNode.setConstructor(false); rewrite.markAsModified(methodDeclaration, modifiedNode);  proposals.add(proposal);   ASTNode parentType= ASTResolving.findParentType(decl); if (parentType instanceof TypeDeclaration) { String constructorName= ((TypeDeclaration) parentType).getName().getIdentifier(); ASTNode nameNode= methodDeclaration.getName(); label= CorrectionMessages.getFormattedString("ReturnTypeSubProcessor.wrongconstructorname.description", constructorName); proposals.add(new ReplaceCorrectionProposal(label, cu, nameNode.getStartPosition(), nameNode.getLength(), constructorName, 1)); }
	public static void addMissingReturnTypeProposals(ProblemPosition problemPos, ArrayList proposals) throws CoreException {		ICompilationUnit cu= problemPos.getCompilationUnit();				CompilationUnit astRoot= AST.parseCompilationUnit(cu, true);		ASTNode selectedNode= ASTResolving.findSelectedNode(astRoot, problemPos.getOffset(), problemPos.getLength());		if (selectedNode != null) {			BodyDeclaration decl= ASTResolving.findParentBodyDeclaration(selectedNode);			if (decl instanceof MethodDeclaration) {				ReturnTypeEvaluator eval= new ReturnTypeEvaluator();				decl.accept(eval);				ITypeBinding typeBinding= eval.getTypeBinding();					ASTRewrite rewrite= new ASTRewrite(astRoot);				AST ast= astRoot.getAST();					Type type;				String typeName;				if (typeBinding != null) {					type= ASTResolving.getTypeFromTypeBinding(ast, typeBinding);					typeName= typeBinding.getName();				} else {					type= ast.newPrimitiveType(PrimitiveType.VOID);					typeName= "void";				}						String label= CorrectionMessages.getFormattedString("ReturnTypeSubProcessor.missingreturntype.description", typeName); //$NON-NLS-1$						Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE);				ASTRewriteCorrectionProposal proposal= new ASTRewriteCorrectionProposal(label, cu, rewrite, 1, image);				if (typeBinding != null) {					proposal.addImport(typeBinding);				}							rewrite.markAsInserted(type);				((MethodDeclaration) decl).setReturnType(type);					proposals.add(proposal);			}		}	}