### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java,v retrieving revision 1.397 diff -u -r1.397 CompletionEngine.java --- codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java 20 May 2009 15:25:54 -0000 1.397 +++ codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java 20 Jul 2009 16:23:34 -0000 @@ -3779,6 +3779,7 @@ TypeDeclaration typeDeclaration = ((ClassScope)scope).referenceContext; if(typeDeclaration.superclass == astNode) { addForbiddenBindings(typeDeclaration.binding); + addForbiddenBindingsForMemberTypes(typeDeclaration); return scope.parent; } TypeReference[] superInterfaces = typeDeclaration.superInterfaces; @@ -3786,6 +3787,7 @@ for (int i = 0; i < length; i++) { if(superInterfaces[i] == astNode) { addForbiddenBindings(typeDeclaration.binding); + addForbiddenBindingsForMemberTypes(typeDeclaration); return scope.parent; } } @@ -3822,6 +3824,15 @@ return scope; } + private void addForbiddenBindingsForMemberTypes(TypeDeclaration typeDeclaration) { + TypeDeclaration[] memberTypes = typeDeclaration.memberTypes; + int memberTypesLen = memberTypes == null ? 0 : memberTypes.length; + for (int i = 0; i < memberTypesLen; i++) { + addForbiddenBindings(memberTypes[i].binding); + addForbiddenBindingsForMemberTypes(memberTypes[i]); + } + } + private char[] computePrefix(SourceTypeBinding declarationType, SourceTypeBinding invocationType, boolean isStatic){ StringBuffer completion = new StringBuffer(10);