Skip to content

Commit 0ae2a07

Browse files
committed
Fix some qualified type relevances
It wasn't counting qualified types in case statements as qualified, for instance. Signed-off-by: David Thompson <davthomp@redhat.com>
1 parent e3efcd5 commit 0ae2a07

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

org.eclipse.jdt.core.javac/src/org/eclipse/jdt/internal/codeassist/DOMCompletionEngine.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1197,9 +1197,9 @@ public void complete(org.eclipse.jdt.internal.compiler.env.ICompilationUnit sour
11971197
boolean isTypeInVariableDeclaration = isTypeInVariableDeclaration(context);
11981198
SwitchCase switchCase = (SwitchCase)DOMCompletionUtil.findParent(this.toComplete, new int[] { ASTNode.SWITCH_CASE });
11991199

1200+
this.qualifyingType = qualifierTypeBinding;
12001201
processMembers(qualifiedName, qualifierTypeBinding, specificCompletionBindings, true);
12011202
if (this.extendsOrImplementsInfo == null && !isTypeInVariableDeclaration && switchCase == null) {
1202-
this.qualifyingType = qualifierTypeBinding;
12031203
publishFromScope(specificCompletionBindings);
12041204
} else if (switchCase != null) {
12051205
ITypeBinding switchBinding = null;
@@ -1230,7 +1230,7 @@ public void complete(org.eclipse.jdt.internal.compiler.env.ICompilationUnit sour
12301230
.map(binding -> toProposal(binding))
12311231
.map(proposal -> {
12321232
if (proposal.getKind() == CompletionProposal.FIELD_REF) {
1233-
proposal.setRelevance(proposal.getRelevance() + RelevanceConstants.R_FINAL + RelevanceConstants.R_QUALIFIED);
1233+
proposal.setRelevance(proposal.getRelevance() + RelevanceConstants.R_FINAL);
12341234
}
12351235
return proposal;
12361236
})

0 commit comments

Comments
 (0)