New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No completion on generic anonymous class instance objects #2508
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the error thrown from the postfix side? Can we handle that error in postfix's handlers?
I don't know. The PR logs and ignore an exception in PostfixTemplateEngine.complete - 2965f0b#diff-37c4c6e9f8f50d2e98e4cde549406f090b08b05fb820f1f07883f8991b88c5c0L231 |
Signed-off-by: Snjezana Peco <snjezana.peco@redhat.com>
Looks like this adds some missing code from eclipse-jdt/eclipse.jdt.ui@36dbc24 How does this fix the illegal argument error though ? I think I was seeing the failure in the "for" postfix template. |
You are right.
Java LS cancels the completion on an exception - https://github.com/eclipse/eclipse.jdt.ls/blob/master/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/handlers/CompletionHandler.java#L98
Right. |
Ah, I thought those additions were somehow related to fixing this. @jdneo , I'm fine with merging, but it might be good to figure out why this only happens in JDT-LS and not upstream. Either way, I don't think the |
I have added them just in case. The fix is at 525953a#diff-37c4c6e9f8f50d2e98e4cde549406f090b08b05fb820f1f07883f8991b88c5c0L234 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gayanper , @snjeza , so then eclipse-jdt/eclipse.jdt.core#802 should be re-opened with respect to the stacktrace ?
One question: If jdt.ui also has the same behavior. Do we need to include those checks about the new templates? (switch, record) Currently we don't have those postfix template. |
@jdneo No, we don't need them. See #2508 (comment) |
cc @gayanper |
@snjeza can you add these details you found out in the jdt issue and open it. I can have a look at it. |
@gayanper I have added eclipse-jdt/eclipse.jdt.core#802 (comment) |
Fixes #2505