proposals.add(new TypeChangeCompletionProposal(targetCu, overridden, astRoot, binding.getReturnType(), false, 7));
TypeChangeCompletionProposal proposal= new TypeChangeCompletionProposal(targetCu, overridden, astRoot, binding.getReturnType(), false, 7); if (overridden.getDeclaringClass().isInterface()) { proposal.setDisplayName(CorrectionMessages.getFormattedString("TypeMismatchSubProcessor.changereturnofimplemented.description", overridden.getName())); } else { proposal.setDisplayName(CorrectionMessages.getFormattedString("TypeMismatchSubProcessor.changereturnofoverridden.description", overridden.getName())); } proposals.add(proposal);
	public static void addIncompatibleReturnTypeProposals(IInvocationContext context, IProblemLocation problem, Collection proposals) throws JavaModelException {		CompilationUnit astRoot= context.getASTRoot();		ASTNode selectedNode= problem.getCoveringNode(astRoot);		if (!(selectedNode instanceof MethodDeclaration)) {			return;		}		MethodDeclaration decl= (MethodDeclaration) selectedNode;		IMethodBinding binding= decl.resolveBinding();		if (binding == null) {			return;		}				IMethodBinding overridden= Bindings.findMethodDefininition(binding, false);		if (overridden == null || overridden.getReturnType() == binding.getReturnType()) {			return;		}		ITypeBinding declaringType= overridden.getDeclaringClass();				ICompilationUnit cu= context.getCompilationUnit();		proposals.add(new TypeChangeCompletionProposal(cu, binding, astRoot, overridden.getReturnType(), false, 8));				ICompilationUnit targetCu= cu;		if (declaringType != null && declaringType.isFromSource()) {			targetCu= ASTResolving.findCompilationUnitForBinding(cu, astRoot, declaringType);		}		if (targetCu != null) {			proposals.add(new TypeChangeCompletionProposal(targetCu, overridden, astRoot, binding.getReturnType(), false, 7));		}	}