File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
org.eclipse.jdt.core.javac/src/org/eclipse/jdt/internal/codeassist Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -339,9 +339,7 @@ public Stream<CompletionProposal> toProposals(boolean expectedOnly) {
339339 .filter (binding -> !assistOptions .checkDeprecation || !isDeprecated (binding .getJavaElement ()))
340340 .flatMap (binding -> {
341341 if (binding instanceof IMethodBinding methodBinding
342- && !(DOMCompletionEngine .this .toComplete .getParent () instanceof QualifiedName )
343- && !(DOMCompletionEngine .this .toComplete .getParent () instanceof MethodInvocation )
344- && !(DOMCompletionEngine .this .toComplete .getParent () instanceof FieldAccess )) {
342+ && !DOMCompletionUtils .isInQualifiedName (DOMCompletionEngine .this .toComplete )) {
345343 // Handle referencing methods from parent classes using ClassName.this.methodName()
346344 // Note that the completion text is correct,
347345 // but due to bugs in jdt.ui this completion doesn't work in practice
Original file line number Diff line number Diff line change 3939import org .eclipse .jdt .core .dom .Name ;
4040import org .eclipse .jdt .core .dom .PrefixExpression ;
4141import org .eclipse .jdt .core .dom .QualifiedName ;
42+ import org .eclipse .jdt .core .dom .SuperFieldAccess ;
4243import org .eclipse .jdt .core .dom .SuperMethodReference ;
4344import org .eclipse .jdt .core .dom .TypeMethodReference ;
4445import org .eclipse .jdt .core .dom .TypePattern ;
@@ -214,10 +215,12 @@ public static boolean isInQualifiedName(ASTNode node) {
214215 FieldAccess .NAME_PROPERTY ,
215216 ExpressionMethodReference .NAME_PROPERTY ,
216217 TypeMethodReference .NAME_PROPERTY ,
217- SuperMethodReference .NAME_PROPERTY ).contains (node .getLocationInParent ())
218+ SuperMethodReference .NAME_PROPERTY ,
219+ SuperFieldAccess .NAME_PROPERTY ).contains (node .getLocationInParent ())
218220 || node instanceof FieldAccess
219221 || node instanceof QualifiedName
220222 || node instanceof SuperMethodReference
223+ || node instanceof SuperFieldAccess
221224 || node instanceof TypeMethodReference ;
222225 }
223226
You can’t perform that action at this time.
0 commit comments