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
eclipse highlighting issues with @SneakyThrows
and @Cleanup
#3049
Comments
Can you provide a small example with instructions how I can reproduce it? In my short test everything seems to work as expected. |
Please find the |
Thanks for this perfect example. The problme is that lombok hides generated nodes for refactorings, cleanups and the highlighter. In most cases this works flawlessly but |
@Rawi01 I can understand the workload, not a lifeblood case anyway, you may fix it in proper time. |
@Rawi01 Or maybe you could brief a bit more so that I do it myself? |
Lombok marks all generated nodes (classes, methods, statements, etc.) as generated. This information is required to handle some cases for example the cleanup/save action part. If eclipse tries to perform some cleanup for the generated nodes it sometimes simply fails because there is no actual code that can be changed. To handle this lombok used some patches for a handcrafted list of save actions. Eclipse added a bunch of new save actions/cleanups in the latest versions and instead of adding them all by hand I replaced this list with a generic mechanism (ff8af61). Eclipse uses the visitor pattern to traverse the AST and the new patch intercepts the The fastest way to fix it is to revert the generic solution and add all new save actions to the list (started that some time ago Rawi01@c8c46af). The downside of this is that we have to adjust the list everytime eclipse (or the language server implementation) changes. A different approach might be to keep the current idea but not hide the children of a To only fix the highlighting you can also remove the |
I still get highlighting issues with
@SneakyThrows
and@Cleanup
since they are mentioned on methods and variables, maybe that's the differenceOriginally posted by @rzwitserloot in #2950 (comment)
The text was updated successfully, but these errors were encountered: