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
VariableDeclarationFragment frag= (VariableDeclarationFragment) selectedNode.getParent();
			if (selectedNode.equals(frag.getName())) {
				nodeToCast= frag.getInitializer();
				IVariableBinding varBinding= frag.resolveBinding();
				if (varBinding != null) {
					castTypeBinding= varBinding.getType();
				}
				receiverNode= frag.getName();
			}
		} else {
			
			ITypeBinding guessedCastTypeBinding= ASTResolving.guessBindingForReference(nodeToCast);
			if (guessedCastTypeBinding != null && castTypeName.equals(guessedCastTypeBinding.getQualifiedName())) {
				castTypeBinding= guessedCastTypeBinding;
			}
		}
		ITypeBinding binding= nodeToCast.resolveTypeBinding();
		if (binding == null || canCast(castTypeName, castTypeBinding, binding)) {
			proposals.add(createCastProposal(context, castTypeName, nodeToCast, 7));
		}
		
		ITypeBinding currBinding= nodeToCast.resolveTypeBinding();
		
		if (currBinding == null || "void".equals(currBinding.getName())) { 
			return;
		}
		
		
		if (parentNodeType == ASTNode.RETURN_STATEMENT) {
			BodyDeclaration decl= ASTResolving.findParentBodyDeclaration(selectedNode);