Bug 32987 Cannot resolve interfaces in same file
in the same file create the following and create an anonymous inner class using the Ctrl+Space mechanism for the Xtra interface: public class Test3 { void method() { Xtra x = new Xtra(); //<-- select anonymous inner class for this using // Ctrl+space } } interface Xtra { public void method(); } result: ------------------------ package org.test; public class Test3 { void method() { Xtra x= new Xtra() { }; } } interface Xtra { public void method(); } -------------------------- as you can see the method method() is missing from the anonymous Xtra inteface!
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/AnonymousTypeCompletionProposal.java
pos++;
		}
		if (pos < document.getLength() && document.getChar(pos) == ')') {
			setReplacementLength(pos - offset + 1);
		}
		return true;
	}	
	
	private boolean createStubs(StringBuffer buf, ImportsStructure imports) throws CoreException {
		if (fDeclaringType == null) {
			return true;
		}
		CodeGenerationSettings settings= JavaPreferencesSettings.getCodeGenerationSettings();
		settings.createComments= false;
		ITypeHierarchy hierarchy= fDeclaringType.newSupertypeHierarchy(null);
		OverrideMethodQuery selectionQuery= fDeclaringType.isClass() ? new OverrideMethodQuery(JavaPlugin.getActiveWorkbenchShell(), true) : null;
		String[] unimplemented= StubUtility.evalUnimplementedMethods(fDeclaringType, hierarchy, true, settings, selectionQuery, imports);
		if (unimplemented != null) {
			for (int i= 0; i < unimplemented.length; i++) {
				buf.append(unimplemented[i]);
				if (i < unimplemented.length - 1) {
					buf.append('\n');
				}
			}
			return true;
		}
		return false;
	}
}