From a38b5b48cbd532545ba2a05aaa3ef4d5f7e64a30 Mon Sep 17 00:00:00 2001 From: Rob Stryker Date: Fri, 20 Dec 2024 11:44:47 -0500 Subject: [PATCH] Fix CompletionContextTests.test0116 and 1 other Signed-off-by: Rob Stryker --- .../jdt/internal/codeassist/DOMCompletionContext.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/DOMCompletionContext.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/DOMCompletionContext.java index 573d2b55c4b..a95761eda4b 100644 --- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/DOMCompletionContext.java +++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/DOMCompletionContext.java @@ -239,6 +239,11 @@ public int getTokenLocation() { if (wrappingNode instanceof Block block) { return block.statements().isEmpty() ? TL_STATEMENT_START : 0; } + if( wrappingNode instanceof AnonymousClassDeclaration anon) { + if(isWithinTypeDeclarationBody(wrappingNode, this.cuBuffer, this.offset)) { + return TL_MEMBER_START; + } + } wrappingNode = wrappingNode.getParent(); } return 0;