Bug 62853 Quick Fix return type of overridden method: empty name for anonymous class [quick fix]
I20040519-0010 - invoke Quick Fix on Composite getTargetControl() -> first proposal is: "Change type of '.getTargetControl(..) to 'Control' -> should be: "Change type of 'new SuperTactileListener() {..}.getTargetControl(..) ..." public class MyPart { MouseMoveListener getHoverUpdater() { return new SuperTactileListener() { public void mouseMove(MouseEvent e) { // ... } public Composite getTargetControl() { return null; } }; } } interface SuperTactileListener extends MouseMoveListener { Control getTargetControl(); }
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/TypeMismatchSubProcessor.java
}
		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));
		}
	}
	
	public static void addIncompatibleThrowsProposals(IInvocationContext context, IProblemLocation problem, Collection proposals) throws JavaModelException {
		CompilationUnit astRoot= context.getASTRoot();
		ASTNode selectedNode= problem.getCoveringNode(astRoot);
		if (!(selectedNode instanceof MethodDeclaration)) {
			return;