### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java =================================================================== RCS file: /home/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java,v retrieving revision 1.266 diff -u -r1.266 CompletionEngine.java --- codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java 28 Nov 2005 11:28:02 -0000 1.266 +++ codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java 13 Dec 2005 10:26:13 -0000 @@ -1184,39 +1184,41 @@ } } } else if (astNode instanceof CompletionOnMemberValueName) { - if (!this.requestor.isIgnored(CompletionProposal.ANNOTATION_ATTRIBUTE_REF)) { - CompletionOnMemberValueName memberValuePair = (CompletionOnMemberValueName) astNode; - Annotation annotation = (Annotation) astNodeParent; - - this.completionToken = memberValuePair.name; - - if (this.completionToken.length == 0) { + CompletionOnMemberValueName memberValuePair = (CompletionOnMemberValueName) astNode; + Annotation annotation = (Annotation) astNodeParent; + + this.completionToken = memberValuePair.name; + + if (this.completionToken.length == 0) { + if(!this.requestor.isIgnored(CompletionProposal.TYPE_REF)) { this.setSourceRange(astNode.sourceStart, astNode.sourceStart - 1, false); findAnnotationReference(annotation.type); - } else { - MemberValuePair[] memberValuePairs = annotation.memberValuePairs(); + } + } else { + MemberValuePair[] memberValuePairs = annotation.memberValuePairs(); + if (!this.requestor.isIgnored(CompletionProposal.ANNOTATION_ATTRIBUTE_REF)) { this.findAnnotationAttributes(this.completionToken, annotation.memberValuePairs(), (ReferenceBinding)annotation.resolvedType); - if (memberValuePairs == null || memberValuePairs.length == 0) { - if (annotation.resolvedType instanceof ReferenceBinding) { - MethodBinding[] methodBindings = - ((ReferenceBinding)annotation.resolvedType).availableMethods(); - if (methodBindings != null && - methodBindings.length == 1 && - CharOperation.equals(methodBindings[0].selector, VALUE)) { - if (this.expectedTypesPtr > -1 && this.expectedTypes[0].isAnnotationType()) { - findTypesAndPackages(this.completionToken, scope); - } else { - findVariablesAndMethods( - this.completionToken, - scope, - FakeInvocationSite, - scope, - insideTypeAnnotation, - true); - // can be the start of a qualified type name - findTypesAndPackages(this.completionToken, scope); - } + } + if (memberValuePairs == null || memberValuePairs.length == 0) { + if (annotation.resolvedType instanceof ReferenceBinding) { + MethodBinding[] methodBindings = + ((ReferenceBinding)annotation.resolvedType).availableMethods(); + if (methodBindings != null && + methodBindings.length == 1 && + CharOperation.equals(methodBindings[0].selector, VALUE)) { + if (this.expectedTypesPtr > -1 && this.expectedTypes[0].isAnnotationType()) { + findTypesAndPackages(this.completionToken, scope); + } else { + findVariablesAndMethods( + this.completionToken, + scope, + FakeInvocationSite, + scope, + insideTypeAnnotation, + true); + // can be the start of a qualified type name + findTypesAndPackages(this.completionToken, scope); } } }