receiverType,
scope,
scope.enclosingSourceType(),
false,
true,
new ObjectVector(),
missingElements,
missingElementsStarts,
missingElementsEnds,
missingElementsHaveProblems);
}
if (!this.requestor.isIgnored(CompletionProposal.FIELD_REF)) {
findClassField(
token,
receiverType,
scope,
missingElements,
missingElementsStarts,
missingElementsEnds,
missingElementsHaveProblems);
}
MethodScope methodScope = null;
if (!isInsideAnnotationAttribute &&
!this.requestor.isIgnored(CompletionProposal.KEYWORD) &&
((scope instanceof MethodScope && !((MethodScope)scope).isStatic)
|| ((methodScope = scope.enclosingMethodScope()) != null && !methodScope.isStatic))) {
if (token.length > 0) {
findKeywords(token, new char[][]{Keywords.THIS}, false, true);
} else {
int relevance = computeBaseRelevance();
relevance += computeRelevanceForResolution();
relevance += computeRelevanceForInterestingProposal();
relevance += computeRelevanceForCaseMatching(this.completionToken, Keywords.THIS);
relevance += computeRelevanceForRestrictions(IAccessRule.K_ACCESSIBLE); // no access restriction for keywords
relevance += R_NON_INHERITED;
this.noProposal = false;
if (!this.requestor.isIgnored(CompletionProposal.KEYWORD)) {
InternalCompletionProposal proposal = createProposal(CompletionProposal.KEYWORD, this.actualCompletionPosition);
proposal.setName(Keywords.THIS);
proposal.setCompletion(Keywords.THIS);
proposal.setReplaceRange(this.startPosition - this.offset, this.endPosition - this.offset);
proposal.setTokenRange(this.tokenStart - this.offset, this.tokenEnd - this.offset);
proposal.setRelevance(relevance);
this.requestor.accept(proposal);
if (DEBUG) {
this.printDebug(proposal);
}
}
}
}
if (!this.requestor.isIgnored(CompletionProposal.FIELD_REF)) {
findFields(
token,
receiverType,
scope,
new ObjectVector(),
new ObjectVector(),
true,
invocationSite,
scope,
false,
false,
missingElements,
missingElementsStarts,
missingElementsEnds,
missingElementsHaveProblems,
null,
-1,
-1);
}
if (!isInsideAnnotationAttribute && !this.requestor.isIgnored(CompletionProposal.METHOD_REF)) {
findMethods(
token,
null,
null,
receiverType,
scope,
new ObjectVector(),
true,
false,
invocationSite,
scope,
false,