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
if (decl instanceof MethodDeclaration) {
				MethodDeclaration methodDeclaration= (MethodDeclaration) decl;
	
				currBinding= Bindings.normalizeTypeBinding(currBinding);
				if (currBinding == null) {
					currBinding= astRoot.getAST().resolveWellKnownType("java.lang.Object"); 
				}
	
				ASTRewrite rewrite= ASTRewrite.create(methodDeclaration.getAST());
				ImportRewrite imports= new ImportRewrite(cu);
				String returnTypeName= imports.addImport(currBinding);
				
				Type newReturnType= ASTNodeFactory.newType(astRoot.getAST(), returnTypeName);
				rewrite.replace(methodDeclaration.getReturnType(), newReturnType, null);
				
				String label= CorrectionMessages.getFormattedString("TypeMismatchSubProcessor.changereturntype.description", currBinding.getName()); 
				Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE);
				LinkedCorrectionProposal proposal= new LinkedCorrectionProposal(label, cu, rewrite, 6, image);
				proposal.setImportRewrite(imports);
				
				String returnKey= "return"; 
				proposal.addLinkedPosition(rewrite.track(newReturnType), true, returnKey);
				ITypeBinding[] typeSuggestions= ASTResolving.getRelaxingTypes(astRoot.getAST(), currBinding);
				for (int i= 0; i < typeSuggestions.length; i++) {
					proposal.addLinkedPositionProposal(returnKey, typeSuggestions[i]);
				}
				proposals.add(proposal);
			}
		}
		if (receiverNode != null) {