### 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.399 diff -u -r1.399 CompletionEngine.java --- codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java 9 Jul 2009 10:47:41 -0000 1.399 +++ codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java 21 Jul 2009 10:55:44 -0000 @@ -3786,6 +3786,7 @@ TypeDeclaration typeDeclaration = ((ClassScope)scope).referenceContext; if(typeDeclaration.superclass == astNode) { addForbiddenBindings(typeDeclaration.binding); + addForbiddenBindingsForMemberTypes(typeDeclaration); return scope.parent; } TypeReference[] superInterfaces = typeDeclaration.superInterfaces; @@ -3793,6 +3794,7 @@ for (int i = 0; i < length; i++) { if(superInterfaces[i] == astNode) { addForbiddenBindings(typeDeclaration.binding); + addForbiddenBindingsForMemberTypes(typeDeclaration); return scope.parent; } } @@ -3829,6 +3831,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);