-
Notifications
You must be signed in to change notification settings - Fork 466
Too many codelenses shown in lombok'ed project #137
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
Comments
So that's an interesting one :-) Basically, the compilation unit lists all the methods generated by lombok (getters, setters...). For each element, the same sourcerange is returned (at the So, while we can mitigate the issue by only returning 1 of those codelenses, there's a larger problem here: how should we handle references of methods/variables only existing in the bytecode, but not at the source level? Or, in the case of lombok, how are we supposed to map a variable annotated @gorkem ideas? |
anyways I think we should not even display the codelens when there are 0 references. Not sure if we should do it at the server level. |
@othomann you wanna take a look at that one? |
@fbricon yes I will as soon as I am in a position to do so. Hopefully today. |
Working on it. |
The source that the parser gets for the unit is: So I think we need to check for the Generated annotation. Will investigate that. |
So this explains why the source methods are returned even if there is no source inside the actual unit on disk. |
I think this issue should be moved to the java-language-server repo. It is the server that returns too many code lens result. It is not VS Code's issue. Any client that supports lsp with code lens would have the same issue. |
Fixed with eclipse-jdtls/eclipse.jdt.ls@1935314 |
Opening an
@Data
annotated class from a lombok-powered project shows multiple codelenses for that annotationSteps To Reproduce
See

The text was updated successfully, but these errors were encountered: