Bug 98344 smart completion for anonymous inner type of abstract inner class missing methods
I'm using Eclipse 3.1 RC1. First I input the following class into Eclipse: public class Test { abstract class Foo { abstract void doSomething(); } void bar() { Foo f = new Foo(); } } The class does not compile because Foo is abstract. If I put the cursor between the parens of the Foo() constructor call and hit CTRL+SPACE, it brings up an "Override/Implement Methods" dialog box, but in that dialog box I only see the methods for java.lang.Object, not the expected Foo.doSomething() method. If Foo is a separate top-level class and not an inner class, the Foo.doSomething() method shows up in the dialog as expected. It also works if I add an open and close curly brace before the semicolon, and then go to the Source menu and choose Override/Implement Methods.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/AnonymousTypeCompletionProposal.java
buffer.append("public class "); 
			buffer.append(dummyName);
			if (fDeclaringType.isInterface())
				buffer.append(" implements "); 
			else
				buffer.append(" extends "); 
			buffer.append(fDeclaringType.getFullyQualifiedName('.'));
			int start= buffer.length();
			buffer.append("{"); 
			buffer.append(lineDelim);
			buffer.append(lineDelim);
			buffer.append("}"); 
			workingCopy.getBuffer().setContents(buffer.toString());
			JavaModelUtil.reconcile(workingCopy);
			final ASTParser parser= ASTParser.newParser(AST.JLS3);
			parser.setResolveBindings(true);
			parser.setSource(workingCopy);
			final CompilationUnit unit= (CompilationUnit) parser.createAST(new NullProgressMonitor());
			IType dummyType= workingCopy.getType(dummyName);
			ITypeBinding binding= null;
			final AbstractTypeDeclaration declaration= (AbstractTypeDeclaration) ASTNodes.getParent(NodeFinder.perform(unit, dummyType.getNameRange()), AbstractTypeDeclaration.class);
			if (declaration != null) {
				binding= declaration.resolveBinding();
				if (binding != null) {
					IMethodBinding[] bindings= StubUtility2.getOverridableMethods(unit.getAST(), binding, true);
					CodeGenerationSettings settings= JavaPreferencesSettings.getCodeGenerationSettings(fDeclaringType.getJavaProject());
					String[] keys= null;
					if (!fDeclaringType.isInterface() && !fDeclaringType.isAnnotation()) {
						OverrideMethodDialog dialog= new OverrideMethodDialog(JavaPlugin.getActiveWorkbenchShell(), null, dummyType, true);
						dialog.setGenerateComment(false);