-
Notifications
You must be signed in to change notification settings - Fork 401
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
[Critical] No completions on field initialiser with @Default and @Builder Lombok annotations #2669
Comments
does it work in Eclipse IDE? |
also not a "critical" issue, as it doesn't break user code (e.g. compilation failure) |
Yes, it does. |
Its ok to change the title to remove critical. But its kind of loss of vital functionality when using Lombok. Its not a blocker since it doesn't cause any compilation issue and it also has a workaround which needs to remove one of lombok annotations to edit the initialise expression. |
I kind of suspect its due to the completion location. Because when builder and default annotation is used to gather the initialiser is moved to Builder class which is generated. And the current source location we are at doesn't really have what we are looking for when things are resolved. If this works in Eclipse, I doubt that the Lombok eclipse plugin takes a different approach by making sure the current source is resolved as it is rather than using the one after Lombok generation. Its just a assumption though 🙂 |
@gayanper
and apply completion doesn't work. |
Thanks for the clarification @snjeza |
No completions on field initializer with @default and @builder Lombok annotations Related issue: eclipse-jdtls#2669 Signed-off-by: Snjezana Peco <[email protected]>
No completions on field initializer with @default and @builder Lombok annotations Related issue: #2669 Signed-off-by: Snjezana Peco <[email protected]>
@snjeza Since the completion responses (from JDT) come back as having the incorrect offset, I assume this is an upstream JDT/lombok issue and that we can revert the PR once it's fixed ? When you said it's an upstream VS Code issue, did you just mean in the sense that VS Code was refusing to display the completion items (I'm assuming because there may be some check somewhere in VS Code or in vscode-languageserver-node that filters out items with improper ranges) ? |
+1 When you said it's an upstream VS Code issue, did you just mean in the sense that VS Code was refusing to display the completion items (I'm assuming because there may be some check somewhere in VS Code or in vscode-languageserver-node that filters out items with improper ranges) It is an upstream jdt.core or lombok issue. |
Take the following example
Now if you try to get completions behind
private Integer offset =
completions doesn't work. But if you remove@Default
or@Builder
the completions work.The text was updated successfully, but these errors were encountered: