Skip to content
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

JAXRS code lens participant based on method name range #194

Closed
jeffmaury opened this issue Oct 5, 2021 · 3 comments · Fixed by #317
Closed

JAXRS code lens participant based on method name range #194

jeffmaury opened this issue Oct 5, 2021 · 3 comments · Fixed by #317
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jeffmaury
Copy link
Contributor

When generating the code lens, the JAXRS participant is computing the range based on the method name element which may lead to strange behavior for methods that are declared on several lines:

image

So on the IntelliJ implementation, I have used the whole method element to compute the range which gives this:

image

The fix is a single line of code change so let me know if you're interested by a PR

@rgrunber
Copy link
Contributor

rgrunber commented Oct 5, 2021

CC'ing @angelozerr . I think it makes sense! getParent() on the ASTNode to get the MethodDeclaration start line instead of the SimpleName ?

In the "method-on-single-line" case, it looks like we placed the codelens above the declaration but below the annotations. Does it make sense to preserve that behaviour ? Does anyone care ?

@angelozerr
Copy link

I think it makes sense! getParent() on the ASTNode to get the MethodDeclaration start line instead of the SimpleName ?

Indeed we should improve that, but...

Does it make sense to preserve that behaviour

It should be nice to keep that.

Does anyone care ?

If I have time, I will do it.

@datho7561
Copy link
Contributor

@JessicaJHee What do you think about this issue? If you are interested and are looking for an issue that won't take too long, I think it could be good. If you're not interested, I could also take a look into implementing it.

@rgrunber rgrunber added this to the 0.6.0 milestone Nov 16, 2022
@rgrunber rgrunber added the bug Something isn't working label Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants