Lines 1184-1222
Link Here
|
1184 |
} |
1184 |
} |
1185 |
} |
1185 |
} |
1186 |
} else if (astNode instanceof CompletionOnMemberValueName) { |
1186 |
} else if (astNode instanceof CompletionOnMemberValueName) { |
1187 |
if (!this.requestor.isIgnored(CompletionProposal.ANNOTATION_ATTRIBUTE_REF)) { |
1187 |
CompletionOnMemberValueName memberValuePair = (CompletionOnMemberValueName) astNode; |
1188 |
CompletionOnMemberValueName memberValuePair = (CompletionOnMemberValueName) astNode; |
1188 |
Annotation annotation = (Annotation) astNodeParent; |
1189 |
Annotation annotation = (Annotation) astNodeParent; |
1189 |
|
1190 |
|
1190 |
this.completionToken = memberValuePair.name; |
1191 |
this.completionToken = memberValuePair.name; |
1191 |
|
1192 |
|
1192 |
if (this.completionToken.length == 0) { |
1193 |
if (this.completionToken.length == 0) { |
1193 |
if(!this.requestor.isIgnored(CompletionProposal.TYPE_REF)) { |
1194 |
this.setSourceRange(astNode.sourceStart, astNode.sourceStart - 1, false); |
1194 |
this.setSourceRange(astNode.sourceStart, astNode.sourceStart - 1, false); |
1195 |
|
1195 |
|
1196 |
findAnnotationReference(annotation.type); |
1196 |
findAnnotationReference(annotation.type); |
1197 |
} else { |
1197 |
} |
1198 |
MemberValuePair[] memberValuePairs = annotation.memberValuePairs(); |
1198 |
} else { |
|
|
1199 |
MemberValuePair[] memberValuePairs = annotation.memberValuePairs(); |
1200 |
if (!this.requestor.isIgnored(CompletionProposal.ANNOTATION_ATTRIBUTE_REF)) { |
1199 |
this.findAnnotationAttributes(this.completionToken, annotation.memberValuePairs(), (ReferenceBinding)annotation.resolvedType); |
1201 |
this.findAnnotationAttributes(this.completionToken, annotation.memberValuePairs(), (ReferenceBinding)annotation.resolvedType); |
1200 |
if (memberValuePairs == null || memberValuePairs.length == 0) { |
1202 |
} |
1201 |
if (annotation.resolvedType instanceof ReferenceBinding) { |
1203 |
if (memberValuePairs == null || memberValuePairs.length == 0) { |
1202 |
MethodBinding[] methodBindings = |
1204 |
if (annotation.resolvedType instanceof ReferenceBinding) { |
1203 |
((ReferenceBinding)annotation.resolvedType).availableMethods(); |
1205 |
MethodBinding[] methodBindings = |
1204 |
if (methodBindings != null && |
1206 |
((ReferenceBinding)annotation.resolvedType).availableMethods(); |
1205 |
methodBindings.length == 1 && |
1207 |
if (methodBindings != null && |
1206 |
CharOperation.equals(methodBindings[0].selector, VALUE)) { |
1208 |
methodBindings.length == 1 && |
1207 |
if (this.expectedTypesPtr > -1 && this.expectedTypes[0].isAnnotationType()) { |
1209 |
CharOperation.equals(methodBindings[0].selector, VALUE)) { |
1208 |
findTypesAndPackages(this.completionToken, scope); |
1210 |
if (this.expectedTypesPtr > -1 && this.expectedTypes[0].isAnnotationType()) { |
1209 |
} else { |
1211 |
findTypesAndPackages(this.completionToken, scope); |
1210 |
findVariablesAndMethods( |
1212 |
} else { |
1211 |
this.completionToken, |
1213 |
findVariablesAndMethods( |
1212 |
scope, |
1214 |
this.completionToken, |
1213 |
FakeInvocationSite, |
1215 |
scope, |
1214 |
scope, |
1216 |
FakeInvocationSite, |
1215 |
insideTypeAnnotation, |
1217 |
scope, |
1216 |
true); |
1218 |
insideTypeAnnotation, |
1217 |
// can be the start of a qualified type name |
1219 |
true); |
1218 |
findTypesAndPackages(this.completionToken, scope); |
1220 |
// can be the start of a qualified type name |
1219 |
} |
1221 |
findTypesAndPackages(this.completionToken, scope); |
1220 |
} |
1222 |
} |
1221 |
} |
1223 |
} |
1222 |
} |
1224 |
} |