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
public static void addTypeMismatchProposals(IInvocationContext context, IProblemLocation problem, Collection proposals) throws CoreException {
		String[] args= problem.getProblemArguments();
		if (args.length != 2) {
			return;
		}
			
		ICompilationUnit cu= context.getCompilationUnit();
		String castTypeName= args[1];
		CompilationUnit astRoot= context.getASTRoot();
		ASTNode selectedNode= problem.getCoveredNode(astRoot);
		if (!(selectedNode instanceof Expression)) {
			return;
		}
		Expression nodeToCast= (Expression) selectedNode;
		Name receiverNode= null;
		ITypeBinding castTypeBinding= null;
		
		int parentNodeType= selectedNode.getParent().getNodeType();
		if (parentNodeType == ASTNode.ASSIGNMENT) {
			Assignment assign= (Assignment) selectedNode.getParent();
			Expression leftHandSide= assign.getLeftHandSide();
			if (selectedNode.equals(leftHandSide)) {
				nodeToCast= assign.getRightHandSide();
			}
			castTypeBinding= assign.getLeftHandSide().resolveTypeBinding();
			if (leftHandSide instanceof Name) {
				receiverNode= (Name) leftHandSide;
			}
		} else if (parentNodeType == ASTNode.VARIABLE_DECLARATION_FRAGMENT) {